{% form_theme form '@SyliusAdmin/Form/theme.html.twig' %}

{{ form_start(form, {'action': path('sylius_admin_product_variant_generate', {'productId': product.id}), 'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate'}}) }}
<div class="ui segment">
    {% include '@SyliusAdmin/ProductVariant/Generate/_form.html.twig' %}
    <div class="ui basic segment">
        <div class="ui buttons">
            <button class="ui labeled icon primary button" type="submit" {% if form.variants.children is empty %}disabled{% endif %}><i class="random icon"></i>{{- 'sylius.ui.generate'|trans -}}</button>
            {% include '@SyliusUi/Form/Buttons/_cancel.html.twig' with {'path': path(configuration.getRouteName('index'), {'productId': product.id})} %}
        </div>
    </div>
    {{ sylius_template_event('sylius.admin.product_variant.generate.form', {'resource': resource}) }}
</div>
{{ form_row(form._token) }}
{{ form_end(form, {'render_rest': false}) }}
