{% embed "system/embed/card/card-with-info-panel.html.twig" %}
    {% import "system/macro/form-component/input-group.html.twig" as input_group %}
    {% import "system/macro/row/color-duo-selection.html.twig" as row_color_duo_selection %}
    {% import "system/macro/row/color-selection.html.twig" as row_color_selection %}
    {% import "system/macro/row/save.html.twig" as row_save %}
    {% import "system/macro/card/card-heading.html.twig" as card_heading %}
    {% block mainHeader %}
        {{ card_heading.component({
            title: localized.headline.cardSettings,
        }) }}
    {% endblock %}
    {% block mainContent %}
        {{ row_color_duo_selection.component({
            colorA:
            {
                id: 'dialogCardBackgroundColor',
                label: localized.field.backgroundColor,
                value: data.dialogCardBackgroundColor,
            },
            colorB:
            {
                id: 'dialogCardTextColor',
                label: localized.field.textColor,
                value: data.dialogCardTextColor,
            },
            title: localized.field.card,
        }) }}

        {% embed "system/embed/form-row.html.twig" %}
            {% import "system/macro/form-component/info-hint.html.twig" as hint %}
            {% import "system/macro/form-component/input-group.html.twig" as input_group %}
            {% block label %}
                <label class="bc-flex bc-items-center bc-space-x-1">
                    <span>{{ localized.field.dialogCardListPaddingSmallScreen | raw }}</span>
                    {{ hint.component({
                        hint: localized.hint.dialogCardListPadding,
                    }) }}
                </label>
            {% endblock %}
            {% block input %}
                <div class="bc-relative bc-flex bc-gap-x-4">
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardListPaddingSmallScreenTop',
                            min: 0,
                            value: data.dialogCardListPaddingSmallScreenTop,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardListPaddingSmallScreenTop">{{ localized.field.top | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardListPaddingSmallScreenRight',
                            min: 0,
                            value: data.dialogCardListPaddingSmallScreenRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardListPaddingSmallScreenRight">{{ localized.field.right | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardListPaddingSmallScreenBottom',
                            min: 0,
                            value: data.dialogCardListPaddingSmallScreenBottom,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardListPaddingSmallScreenBottom">{{ localized.field.bottom | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardListPaddingSmallScreenLeft',
                            min: 0,
                            value: data.dialogCardListPaddingSmallScreenLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardListPaddingSmallScreenLeft">{{ localized.field.left | raw }}</label>
                    </div>
                </div>
            {% endblock %}
        {% endembed %}

        {% embed "system/embed/form-row.html.twig" %}
            {% import "system/macro/form-component/info-hint.html.twig" as hint %}
            {% import "system/macro/form-component/input-group.html.twig" as input_group %}
            {% block label %}
                <label class="bc-flex bc-items-center bc-space-x-1">
                    <span>{{ localized.field.dialogCardListPaddingMediumScreen | raw }}</span>
                    {{ hint.component({
                        hint: localized.hint.dialogCardListPadding,
                    }) }}
                </label>
            {% endblock %}
            {% block input %}
                <div class="bc-relative bc-flex bc-gap-x-4">
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardListPaddingMediumScreenTop',
                            min: 0,
                            value: data.dialogCardListPaddingMediumScreenTop,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardListPaddingMediumScreenTop">{{ localized.field.top | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardListPaddingMediumScreenRight',
                            min: 0,
                            value: data.dialogCardListPaddingMediumScreenRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardListPaddingMediumScreenRight">{{ localized.field.right | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardListPaddingMediumScreenBottom',
                            min: 0,
                            value: data.dialogCardListPaddingMediumScreenBottom,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardListPaddingMediumScreenBottom">{{ localized.field.bottom | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardListPaddingMediumScreenLeft',
                            min: 0,
                            value: data.dialogCardListPaddingMediumScreenLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardListPaddingMediumScreenLeft">{{ localized.field.left | raw }}</label>
                    </div>
                </div>
            {% endblock %}
        {% endembed %}

        {% embed "system/embed/form-row.html.twig" %}
            {% import "system/macro/form-component/input-group.html.twig" as input_group %}
            {% block label %}
                <label>{{ localized.field.dialogCardBorderRadius | raw }}</label>
            {% endblock %}
            {% block input %}
                <div class="bc-relative bc-flex bc-gap-x-4">
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardBorderRadiusTopLeft',
                            min: 0,
                            value: data.dialogCardBorderRadiusTopLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardBorderRadiusTopLeft">{{ localized.field.topLeft | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardBorderRadiusTopRight',
                            min: 0,
                            value: data.dialogCardBorderRadiusTopRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardBorderRadiusTopRight">{{ localized.field.topRight | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardBorderRadiusBottomLeft',
                            min: 0,
                            value: data.dialogCardBorderRadiusBottomLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardBorderRadiusBottomLeft">{{ localized.field.bottomLeft | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogCardBorderRadiusBottomRight',
                            min: 0,
                            value: data.dialogCardBorderRadiusBottomRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogCardBorderRadiusBottomRight">{{ localized.field.bottomRight | raw }}</label>
                    </div>
                </div>
            {% endblock %}
        {% endembed %}

        {{ row_color_duo_selection.component({
            colorA:
            {
                id: 'dialogCardControlElementColor',
                label: localized.field.default,
                value: data.dialogCardControlElementColor,
            },
            colorB:
            {
                id: 'dialogCardControlElementColorHover',
                label: localized.field.hover,
                value: data.dialogCardControlElementColorHover,
            },
            title: localized.field.dialogControlElement,
        }) }}

        {{ row_color_selection.component({
            hint: localized.hint.dialogCardSeparatorColor,
            id: 'dialogCardSeparatorColor',
            label: localized.field.dialogSeparatorColor,
            value: data.dialogCardSeparatorColor,
        }) }}

        {{ row_save.component({}, 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: 'accordionGeneralSettings', expanded: true} %}
                    {% block title %}
                        {{ localized.thingsToKnow.headlineOnWhichElementsDoTheseSettingsHaveAVisualImpact | raw }}
                    {% endblock %}
                    {% block content %}
                        <p>{{ localized.thingsToKnow.cardExplained | raw }}</p>
                        <p>{{ localized.thingsToKnow.onWhichElementsDoTheseSettingsHaveAVisualImpact | raw }}</p>
                        <p>
                            <a class="bc-flex bc-justify-center" data-brlbs-modal-target="borlabsModalCardSettings" href="#" role="button">
                                <img class="bc-w-48 bc-h-48 bc-rounded-md bc-shadow-md" src="{{ imageUrl('ttk-dialog-appearance-card-settings.png') }}" alt="">
                            </a>
                        </p>
                        {% embed "system/embed/modal/modal.html.twig" with {
                            id: 'borlabsModalCardSettings',
                            maxWidth: 'bc-max-w-2xl',
                            title: localized.headline.cardSettings,
                        } %}
                            {% block icon %}
                                {% import "system/macro/icons/paint-brush.html.twig" as pain_brush_icon %}
                                <div class="bc-mx-auto bc-flex bc-h-12 bc-w-12 bc-flex-shrink-0 bc-items-center bc-justify-center bc-rounded-full bc-bg-gray-800 bc-text-white sm:bc-mx-0 sm:bc-h-10 sm:bc-w-10">
                                    {{ pain_brush_icon.component({}) }}
                                </div>
                            {% endblock %}

                            {% block description %}
                                <img src="{{ imageUrl('ttk-dialog-appearance-card-settings.png') }}" alt="">
                                <p class="bc-text-center">{{ localized.thingsToKnow.cardExplained | raw }}</p>
                            {% endblock %}
                        {% endembed %}
                    {% endblock %}
                {% endembed %}
            {% endblock %}
        {% endembed %}
    {% endblock %}
{% endembed %}
