<?xml version="1.0" encoding="UTF-8"?>

<?context-directive job ctxfile x-setups.ctx ?>

<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">

    <cd:command name="definespreadsheet" level="style" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupspreadsheet"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupspreadsheet" level="style" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="period">
                    <cd:constant type="cd:text"/>
                </cd:parameter>
                <cd:parameter name="comma">
                    <cd:constant type="cd:text"/>
                </cd:parameter>
                <cd:parameter name="split">
                    <cd:constant type="yes"/>
                    <cd:constant type="no" default="yes"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="resetspreadsheet" level="system" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="spreadsheet" type="environment" level="document" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="showspreadsheet" level="document" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="inspectspreadsheet" level="document" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setspreadsheet" level="system" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
            <cd:resolve name="argument-number"/>
            <cd:resolve name="argument-number"/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="getspreadsheet" level="system" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
            <cd:resolve name="argument-number"/>
            <cd:resolve name="argument-number"/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelsespreadsheetcell" level="system" category="tables" keywords="conditional" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
            <cd:resolve name="argument-number"/>
            <cd:resolve name="argument-number"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifspreadsheetcellelse" level="system" category="tables" keywords="conditional" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
            <cd:resolve name="argument-number"/>
            <cd:resolve name="argument-number"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="TABLEsetspreadsheet" level="system" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="TABLEgetspreadsheet" level="system" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setspr" level="document" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="getspr" level="document" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="spreadsheettable" type="environment" level="document" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupTABLE"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="row" type="environment" scope="spreadsheettable" level="document" category="tables" file="m-spreadsheet.mkiv"/>

    <cd:command name="cell" type="environment" scope="spreadsheettable" level="document" category="tables" file="m-spreadsheet.mkiv">
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="bTD"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

</cd:interface>
