{% trans_default_domain 'lcshop' %}

{% import '@LcShop/backend/default/block/macros.html.twig' as macros %}


<script>
    window.merchantPanelOrderValues = {
        {% if form.merchantConfigs['is-open-full-time'] is defined %}isOpenFullTime: {{ form.merchantConfigs['is-open-full-time'].vars.data.value }}{% endif %}
    };
</script>


<div class="row">
    <div class="col-8">
        {{ macros.card_start('Merchant.order','light') }}
        <div class="col-6">
            {{ form_row(form.merchantConfigs['minimum-amount-cb']) }}
        </div>
        <div class="col-6">
            {{ form_row(form.merchantConfigs['maximum-order-week']) }}
        </div>
        {% if form.merchantConfigs['is-open-full-time'] is defined %}
            <div class="col-12">
                {% for field in form.merchantConfigs['is-open-full-time'] %}
                    {% if field.vars.name == 'value' %}
                        {{ form_row(field, {'attr': {"v-model" : 'isOpenFullTime'}}) }}
                    {% else %}
                        {{ form_row(field) }}
                    {% endif %}
                {% endfor %}
            </div>
        {% endif %}
        {% if form.merchantConfigs['message-site-opening-background'] is defined %}
            <div v-show="isOpenFullTime == true" class="col-6">
                {{ form_row(form.merchantConfigs['message-site-opening-background']) }}
            </div>
        {% endif %}
        {% if form.merchantConfigs['message-site-opening'] is defined %}
            <div v-show="isOpenFullTime == true" class="col-6">
                {{ form_row(form.merchantConfigs['message-site-opening']) }}
            </div>
        {% endif %}
        <div v-show="isOpenFullTime == false" class="col-6">
            {{ form_row(form.merchantConfigs['order-open-day']) }}
        </div>
        <div v-show="isOpenFullTime == false" class="col-6">
            {{ form_row(form.merchantConfigs['order-open-time']) }}
        </div>
        {% if form.merchantConfigs['order-open-day-vip'] is defined %}
            <div v-show="isOpenFullTime == false" class="col-6">
                {{ form_row(form.merchantConfigs['order-open-day-vip']) }}
            </div>
        {% endif %}
        {% if form.merchantConfigs['order-open-time-vip'] is defined %}
            <div v-show="isOpenFullTime == false" class="col-6">
                {{ form_row(form.merchantConfigs['order-open-time-vip']) }}
            </div>
        {% endif %}
        <div v-show="isOpenFullTime == false" class="col-6">
            {{ form_row(form.merchantConfigs['order-close-day']) }}
        </div>
        <div v-show="isOpenFullTime == false" class="col-6">
            {{ form_row(form.merchantConfigs['order-close-time']) }}
        </div>
        <div v-show="isOpenFullTime == false" class="col-6">
            {{ form_row(form.dateBeginHoliday) }}
        </div>
        <div v-show="isOpenFullTime == false" class="col-6">
            {{ form_row(form.dateEndHoliday) }}
        </div>
        {{ macros.card_end() }}
    </div>
</div>
