{% extends '@Tabler/wizard.html.twig' %}
{% from '@Tabler/components/button.html.twig' import button %}
{% from '@Tabler/components/buttons.html.twig' import submit_button %}
{% from '@Tabler/components/progress_bar.html.twig' import progress_bar %}

{% block title %}{{- get_title() -}}{% endblock %}
{% block container_size %}container-tight{% endblock %}
{% block wizard_logo %}{% endblock %}

{% block wizard_before %}
    {% if form is defined %}
        {{ form_start(form) }}
    {% endif %}
{% endblock %}

{% block wizard_after %}
    {% if form is defined %}
        {{ form_end(form) }}
    {% endif %}
{% endblock %}

{% block wizard_progress_bar %}
    {% if percent is defined and percent is not null %}
        {{ progress_bar({value: percent, max: 100, min: 0}) }}
    {% endif %}
{% endblock %}

{% block wizard_previous_button %}
    {% if previous is defined and previous is not null %}
        {{ button(false, { title : 'Previous'|trans({}, 'TablerBundle'), combined: true, url: path(previous) }, 'link') }}
    {% endif %}
{% endblock %}

{% block wizard_next_button %}
    {% if form is defined %}
        {{ submit_button(false, { title : 'Next'|trans({}, 'TablerBundle'), combined: true }, 'primary') }}
    {% else %}
        {% if next is defined and next is not null %}
            {{ button(false, { title : 'Next'|trans({}, 'TablerBundle'), combined: true, url: path(next) }, 'primary') }}
        {% endif %}
    {% endif %}
{% endblock %}
