<table class="lcars-table">
    <tbody>
        {% for axis in "XYTxXyY"|make_list %}
        {% cycle plot_decorations.x_label plot_decorations.y_label plot_decorations.title plot_decorations.xmin plot_decorations.xmax plot_decorations.ymin plot_decorations.ymax as value silent %}
        {% cycle "X label" "Y label" "Title" "Xmin" "Xmax" "Ymin" "Ymax" as label silent %}
        <tr>
            <td>
                <label for="{{ label|slugify }}">{{ label }}:</label>
            </td>
            <td>
                <input type="text" 
                       id="{{ label|slugify }}"
                       class="param"
                       value="{{ value }}">
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>

<div class="lcars-row">
    <div id="previous-selection"
         class="lcars-bracket left lcars-melrose-bg button center-center" 
         style="width:50%">
        <i class="fa fa-plus"></i>
    </div>
    <div id="next-selection"
         class="lcars-bracket right button center-center" 
         style="width:50%">
        <i class="fa fa-chevron-right"></i>
    </div>
</div>
{% include "results/param_table.html" with param_group="substitution" col1="LC Substitution" col2="Value" data=data_select.0.lc_substitutions can_add=1 %}

{% include "results/param_table.html" with param_group="find-best" col1="Find Best" col2="Allowed Values" data=data_select.0.find_best can_add=1 %}

<table class="lcars-table">
    <tbody>
        <tr>
            <td>
                <label for="minimize">Minimize:</label>
            </td>
            <td>
                <input type="text" 
                       id="minimize"
                       class="param"
                       value="{{ data_select.0.minimize }}">
            </td>
        </tr>
        <tr>
            <td>
                <label for="include-apphot" style="text-align: left">
                    Aperture Photometry
                </label>
            </td>
            <td>
                <input type="checkbox" 
                       id="include-apphot" 
                       name="include-apphot" 
                       checked 
                       class="param"/>
            </td>
        </tr>
        <tr>
            <td>
                <label for="include-shapefit" style="text-align: left">
                    PSF/PRF Fit
                </label>
            </td>
            <td>
                <input type="checkbox" 
                       id="include-shapefit" 
                       name="include-shapefit" 
                       checked 
                       class="param"/>
            </td>
        </tr>
        <tr>
            <td><label for="points-selection">LC Points Selection:</label></td>
            <td>
                <input type="text" 
                       id="points-selection"
                       class="param"
                       value="{{ data_select.0.selection }}">
            </td>
        </tr>
    </tbody>
</table>



<div class="lcars-row">
    <div id="previous-curve" 
         class="lcars-bracket left center-center lcars-melrose-bg button">
        <i class="fa fa-plus"></i>
    </div>

    {% include "results/curve_config.html" with plot_config=data_select.0.plot_config.0 expressions=data_select.0.expressions %}

    <div id="next-curve" 
         class="lcars-bracket right center-center button">
        <i class="fa fa-chevron-right"></i>
    </div>
</div>

{{ data_select|json_script:"lc-data-select" }}

<div class="lcars-row center-center">
    <label for="select-model">Model:</label>
    <select name="select-model" 
            id="select-model"
            class="lcars-text-box lcars-gray-bg lcars-husk-color param"
            style="width: 100%">
        <option value=""
                {% if not data_select.0.model %}
                selected
                {% endif %}
                >
        </option>
        <option value="transit"
                {% if data_select.0.model %}
                selected
                {% endif %}
                >
                Transit
        </option>
    </select>
</div>


<div class="config-row"></div>
<div id="define-model"
       {% if not config.model.enabled %}
       style="display: none;"
       {% endif %}
       >
</div>

<div class="lcars-bar horizontal config-row" style="width: 100%">
    Plot Quantities
</div>

{% include "results/param_table.html" with param_group="lc-expression" col1="Name" col2="Expression" data=data_select.0.expressions can_add=1 %}
