<?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="definemathcases" file="math-ali.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmathcases"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupmathcases" file="math-ali.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="left">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="right">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="strut">
                    <cd:constant type="yes" default="yes"/>
                    <cd:constant type="no"/>
                </cd:parameter>
                <cd:parameter name="style">
                    <cd:resolve name="value-style"/>
                </cd:parameter>
                <cd:parameter name="distance">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="numberdistance">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="mathcases" type="environment" generated="yes" variant="instance" file="math-ali.mkiv">
        <cd:sequence>
            <cd:instance value="mathcases"/>
        </cd:sequence>
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmathcases"/>
            </cd:assignments>
        </cd:arguments>
        <cd:instances>
            <cd:resolve name="instance-mathcases"/>
        </cd:instances>
    </cd:command>

    <!--

        <cd:command name="mathcases" type="environment" file="math-ali.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupmathcases"/>
                </cd:assignments>
            </cd:arguments>
        </cd:command>

        <cd:command name="cases" type="environment" file="math-ali.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupmathcases"/>
                </cd:assignments>
            </cd:arguments>
        </cd:command>

    -->

</cd:interface>
