{% import "_includes/forms" as forms %}

{% set input %}
    <table class="data">
        {% for option in allOptions %}
            <tr>
                <td>
                    {{ forms.lightswitch({
                        on: (option in field.options),
                        small: true,
                        name: 'options[]',
                        value: option
                    }) }}
                </td>
                <td>
                    <span data-icon="pos{{ option|replace('-', '') }}" aria-hidden="true"></span>
                </td>
                <td class="code">
                    {{ option }}
                </td>
            </tr>
        {% endfor %}
    </table>
{% endset %}

{{ forms.field({
    label: "Options"|t('app'),
    instructions: "Choose which position options should be available to your field."|t('app'),
}, input) }}
