{% from '@SyliusAdmin/Macro/translationForm.html.twig' import translationForm %}

<div class="ui active tab" data-tab="details">
    <h3 class="ui dividing header">{{ 'sylius.ui.details'|trans }}</h3>

    <div class="ui segments">
        {{ translationForm(form.translations) }}
        <div class="ui hidden divider"></div>
        <div class="ui segment">
            {{ form_row(form.code) }}
            {{ form_row(form.enabled) }}
            <div class="two fields">
                {{ form_row(form.shippingCategory) }}
            </div>
            {{form_label(form.channelPricings)}}
            {% include "@SyliusAdmin/Product/_channel_pricing.html.twig" with { product: product_variant.product, variantForm: form } only %}
        </div>
        <div class="ui segment">
            <div class="one field">
                {{ form_row(form.shippingRequired) }}
            </div>
        </div>
        {% if form.optionValues is defined and form.optionValues|length > 0 %}
        <div class="ui hidden divider"></div>
        <div class="ui segment">
            <h4 class="ui dividing header">{{ 'sylius.ui.options'|trans }}</h4>
            {% for option_form in form.optionValues %}
                {{ form_row(option_form) }}
            {% endfor %}
        </div>
        {% endif %}
        <div class="ui hidden divider"></div>
        <div class="ui segment">
            <h4 class="ui dividing header">{{ 'sylius.ui.properties'|trans }}</h4>
            {{ form_row(form.height) }}
            {{ form_row(form.width) }}
            {{ form_row(form.depth) }}
            {{ form_row(form.weight) }}
        </div>
    </div>

    {{ sylius_template_event(['sylius.admin.product_variant.' ~ action ~ '.tab_details', 'sylius.admin.product_variant.tab_details'], {'form': form}) }}
</div>
