<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_order_select_document_type_modal %}
<sw-modal
    v-bind="$attrs"
    :title="$tc('sw-order.components.selectDocumentTypeModal.title')"
    variant="small"
    class="sw-order-select-document-type-modal"
    @modal-close="$emit('modal-close', false)"
>

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_order_select_document_type_modal_document_types %}
    <sw-radio-field
        v-if="!isLoading && documentTypes.length"
        v-model:value="documentType"
        :options="documentTypes"
        class="sw-order-select-document-type-modal__radio-field"
        @update:value="onRadioFieldChange"
    />
    {% endblock %}

    <template #modal-footer>
        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_order_select_document_type_modal_footer_action_cancel %}
        <sw-button
            @click="$emit('modal-close', false)"
        >
            {{ $tc('global.default.cancel') }}
        </sw-button>
        {% endblock %}

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_order_select_document_type_modal_footer_action_create %}
        <sw-button
            variant="primary"
            @click="$emit('modal-close', true)"
        >
            {{ $tc('sw-order.components.selectDocumentTypeModal.primaryAction') }}
        </sw-button>
        {% endblock %}

    </template>
</sw-modal>
{% endblock %}
