{% import "system/macro/navigation/breadcrumb.html.twig" as breadcrumb %}

{% if not isPluginUnlocked() %}
    {{ messages() | raw }}
{% else %}
    {{ breadcrumb.component({items: [localized.breadcrumb.module]}, localized) }}

    {{ messages() | raw }}

    {% embed "system/embed/card/card-with-info-panel-below.html.twig" %}
        {% import "style-blocker/macro/style-blocker-table.html.twig" as style_blocker_table %}
        {% import "system/macro/card/card-heading.html.twig" as card_heading %}

        {% block mainHeader %}
            {{ card_heading.component({
                title: localized.headline.styleBlockers,
                buttonText: localized.global.button.addNew,
                buttonLink: wpNonceUrl("?page=#{controllerId}&action=edit&id=-1", "#{controllerId}--1-edit"),
            }, localized) }}
        {% endblock %}

        {% block mainContent %}
            {{ style_blocker_table.component({
                controllerId: controllerId,
                styleBlockers: data.styleBlockers,
            }, localized) }}
        {% endblock %}

        {% block infoPanelHeader %}
            {{ localized.global.headline.thingsToKnow | raw }}
        {% endblock %}

        {% block infoPanelContent %}
            {% embed "system/embed/accordion/accordion-group.html.twig" %}
                {% block content %}
                    {% embed "system/embed/accordion/accordion-group.html.twig" %}
                        {% block content %}
                            {% embed "system/embed/accordion/accordion.html.twig" with { id: 'accordionStyleBlockerExplained', expanded: true } %}
                                {% block title %}
                                    {{ localized.thingsToKnow.headlinePurposeStyleBlockers | raw }}
                                {% endblock %}
                                {% block content %}
                                    <p>{{ localized.thingsToKnow.purposeStyleBlockersA | raw }}</p>
                                    <p>{{ localized.thingsToKnow.purposeStyleBlockersB | raw }}</p>
                                {% endblock %}
                            {% endembed %}

                            {% embed "system/embed/accordion/accordion.html.twig" with { id: 'accordionLanguageIndependent' } %}
                                {% block title %}
                                    {{ localized.thingsToKnow.languageIndependent | raw }}
                                {% endblock %}
                                {% block content %}
                                    {{ localized.thingsToKnow.languageIndependentExplained | raw }}
                                {% endblock %}
                            {% endembed %}

                            {% embed "system/embed/accordion/accordion.html.twig" with {id: 'accordionSymbolsExplained' } %}
                                {% import "system/macro/icons/edit.html.twig" as edit_icon %}
                                {% import "system/macro/icons/switch-off.html.twig" as switch_off %}
                                {% import "system/macro/icons/switch-on.html.twig" as switch_on %}
                                {% import "system/macro/icons/trash.html.twig" as trash_icon %}

                                {% block title %}
                                    {{ localized.thingsToKnow.headlineSymbolsExplained | raw }}
                                {% endblock %}
                                {% block content %}
                                    <ul class="bc-space-y-2 bc-text-left">
                                        <li>{{ switch_on.component({ color: 'bc-text-white', invertSlider: true }) }} {{ localized.thingsToKnow.symbolExplainedActive | raw }}</li>
                                        <li>{{ switch_off.component({ color: 'bc-text-white' }) }} {{ localized.thingsToKnow.symbolExplainedInactive | raw }}</li>
                                        <li>{{ trash_icon.component({}) }} {{ localized.thingsToKnow.symbolExplainedDelete | raw }}</li>
                                        <li>{{ edit_icon.component({}) }} {{ localized.thingsToKnow.symbolExplainedEdit | raw }}</li>
                                    </ul>
                                {% endblock %}
                            {% endembed %}
                        {% endblock %}
                    {% endembed %}
                {% endblock %}
            {% endembed %}
        {% endblock %}
    {% endembed %}
{% endif %}
