{% extends "admin/base_admin.html.twig" %}

{% block card_title %}
    <i class="fas fa-qrcode fa-fw"></i> {{ type_label_p(entity) }}
{% endblock %}

{% block additional_pills %}
    <li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#tab_advanced">{% trans %}label_profile.advanced{% endtrans %}</a></li>
    <li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#tab_comment">{% trans %}label_profile.comment{% endtrans %}</a></li>
{% endblock %}

{% block additional_panes %}
    <div class="tab-pane" id="tab_advanced">
        {{ form_row(form.options.additional_css) }}
        {{ form_widget(form.options) }}
    </div>

    <div class="tab-pane" id="tab_comment">
        {{ form_widget(form.comment) }}
    </div>
{% endblock %}

{% block comment %}{% endblock %}

{% block additional_controls %}
    {{ form_row(form.show_in_dropdown) }}
    {{ form_row(form.options.supported_element) }}
    <div class="mb-2 row">
        {{ form_label(form.options.width) }}
        <div class="{{ col_input }}">
            <div class="input-group">
                {{ form_widget(form.options.width) }}

                <span class="input-group-text">x</span>

                {{ form_widget(form.options.height) }}

                <span class="input-group-text">mm</span>
            </div>
        </div>
    </div>
    {{ form_row(form.options.barcode_type) }}
    {{ form_row(form.options.lines) }}
{% endblock %}

{% block additional_content %}
    {% if pdf_data is defined and pdf_data is not empty %}
        <div class="card mt-2 mb-2 p-1 border-secondary" style="resize: vertical; overflow: scroll; height: 250px;">
            <object id="pdf_preview"  data="{{ pdf_data | data_uri(mime='application/pdf') }}"style="height: inherit">
            </object>
        </div>
    {% endif %}
{% endblock %}

{% block edit_title %}
    {% trans %}label_profile.edit{% endtrans %}: <a href="{{ path("label_dialog_profile", {"profile": entity.id}) }}" >{{ entity.name }}</a>
{% endblock %}

{% block new_title %}
    {% trans %}label_profile.new{% endtrans %}
{% endblock %}
