<form action="{{ "?page=#{controllerId}&action=save&id=#{data.package.id}" ~ (data.additionalQueryParameters ? "&#{data.additionalQueryParameters}" : "") }}" method="post" class="needs-validation bc-group/form" novalidate>
{% embed "system/embed/card/card-with-info-panel.html.twig" %}
    {% import "system/macro/card/card-heading.html.twig" as card_heading %}
    {% block mainHeader %}
        {{ card_heading.component({
            title: localized.headline.autoUpdateSettings,
        }) }}
    {% endblock %}

    {% block mainContent %}
        {% import "system/macro/row/save.html.twig" as row_save %}
        {% import "system/macro/row/switch-button.html.twig" as row_switch_button %}

        {{ row_switch_button.component({
            hint: localized.hint.autoUpdateEnabled,
            id: 'autoUpdateEnabled',
            label: localized.field.autoUpdateEnabled,
            value: data.package.autoUpdateEnabled,
        }) }}

        {{ row_switch_button.component({
            hint: localized.hint.autoUpdateOverwriteCode,
            id: 'autoUpdateOverwriteCode',
            label: localized.field.autoUpdateOverwriteCode,
            value: data.package.autoUpdateOverwriteCode,
        }) }}

        {{ row_switch_button.component({
            hint: localized.hint.autoUpdateOverwriteTranslation,
            id: 'autoUpdateOverwriteTranslation',
            label: localized.field.autoUpdateOverwriteTranslation,
            value: data.package.autoUpdateOverwriteTranslation,
        }) }}

        {{ row_save.component({
            action: 'save',
            button: localized.global.button.save,
            nonce: wpNonceField("#{controllerId}-#{data.package.id}-save"),
            value: data.package.id,
        }, 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.html.twig" with {id: 'accordionAutoUpdateSettings', expanded: true} %}
                    {% block title %}
                        {{ localized.thingsToKnow.headlineAutoUpdateSettings | raw }}
                    {% endblock %}
                    {% block content %}
                        <p>{{ localized.thingsToKnow.autoUpdateExplainedA | raw }}</p>
                        <p>{{ localized.thingsToKnow.autoUpdateExplainedB | raw }}</p>
                        <p>{{ localized.thingsToKnow.autoUpdateExplainedC | raw }}</p>
                    {% endblock %}
                {% endembed %}
            {% endblock %}
        {% endembed %}
    {% endblock %}
{% endembed %}
</form>
