{% 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/input-group.html.twig" as row_input_group %}
    {% 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.listSettings,
        }) }}
    {% endblock %}
    {% block mainContent %}
        {{ row_color_duo_selection.component({
            colorA:
            {
                id: 'dialogListItemBackgroundColorOdd',
                label: localized.field.backgroundColor,
                value: data.dialogListItemBackgroundColorOdd,
            },
            colorB:
            {
                id: 'dialogListItemTextColorOdd',
                label: localized.field.textColor,
                value: data.dialogListItemTextColorOdd,
            },
            title: localized.field.dialogListItemOdd,
        }) }}

        {{ row_color_duo_selection.component({
            colorA:
            {
                id: 'dialogListItemBackgroundColorEven',
                label: localized.field.backgroundColor,
                value: data.dialogListItemBackgroundColorEven,
            },
            colorB:
            {
                id: 'dialogListItemTextColorEven',
                label: localized.field.textColor,
                value: data.dialogListItemTextColorEven,
            },
            title: localized.field.dialogListItemEven,
        }) }}

        {% 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.dialogListPaddingSmallScreen | raw }}</span>
                    {{ hint.component({
                        hint: localized.hint.dialogListPadding,
                    }) }}
                </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: 'dialogListPaddingSmallScreenTop',
                            min: 0,
                            value: data.dialogListPaddingSmallScreenTop,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListPaddingSmallScreenTop">{{ localized.field.top | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogListPaddingSmallScreenRight',
                            min: 0,
                            value: data.dialogListPaddingSmallScreenRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListPaddingSmallScreenRight">{{ localized.field.right | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogListPaddingSmallScreenBottom',
                            min: 0,
                            value: data.dialogListPaddingSmallScreenBottom,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListPaddingSmallScreenBottom">{{ localized.field.bottom | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogListPaddingSmallScreenLeft',
                            min: 0,
                            value: data.dialogListPaddingSmallScreenLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListPaddingSmallScreenLeft">{{ 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.dialogListPaddingMediumScreen | raw }}</span>
                    {{ hint.component({
                        hint: localized.hint.dialogListPadding,
                    }) }}
                </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: 'dialogListPaddingMediumScreenTop',
                            min: 0,
                            value: data.dialogListPaddingMediumScreenTop,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListPaddingMediumScreenTop">{{ localized.field.top | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogListPaddingMediumScreenRight',
                            min: 0,
                            value: data.dialogListPaddingMediumScreenRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListPaddingMediumScreenRight">{{ localized.field.right | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogListPaddingMediumScreenBottom',
                            min: 0,
                            value: data.dialogListPaddingMediumScreenBottom,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListPaddingMediumScreenBottom">{{ localized.field.bottom | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogListPaddingMediumScreenLeft',
                            min: 0,
                            value: data.dialogListPaddingMediumScreenLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListPaddingMediumScreenLeft">{{ 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.dialogListBorderRadius | 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: 'dialogListBorderRadiusTopLeft',
                            min: 0,
                            value: data.dialogListBorderRadiusTopLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListBorderRadiusTopLeft">{{ localized.field.topLeft | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogListBorderRadiusTopRight',
                            min: 0,
                            value: data.dialogListBorderRadiusTopRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListBorderRadiusTopRight">{{ localized.field.topRight | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogListBorderRadiusBottomLeft',
                            min: 0,
                            value: data.dialogListBorderRadiusBottomLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListBorderRadiusBottomLeft">{{ localized.field.bottomLeft | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogListBorderRadiusBottomRight',
                            min: 0,
                            value: data.dialogListBorderRadiusBottomRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogListBorderRadiusBottomRight">{{ localized.field.bottomRight | raw }}</label>
                    </div>
                </div>
            {% endblock %}
        {% endembed %}

        {{ row_input_group.component({
            append: 'px',
            cssClasses: ['bc-pr-[35px]'],
            id: 'dialogListItemSeparatorWidth',
            isRequired: false,
            label: localized.field.dialogListItemSeparatorWidth,
            min: '0',
            type: 'number',
            value: data.dialogListItemSeparatorWidth,
            width: 'bc-w-1/5'
        }) }}

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

        {{ row_color_duo_selection.component({
            colorA:
            {
                id: 'dialogListItemControlElementColor',
                label: localized.field.default,
                value: data.dialogListItemControlElementColor,
            },
            colorB:
            {
                id: 'dialogListItemControlElementColorHover',
                label: localized.field.hover,
                value: data.dialogListItemControlElementColorHover,
            },
            title: localized.field.dialogListItemControlElement,
        }) }}

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

        {{ 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: 'accordionListSettings', expanded: true} %}
                    {% block title %}
                        {{ localized.thingsToKnow.headlineOnWhichElementsDoTheseSettingsHaveAVisualImpact | raw }}
                    {% endblock %}
                    {% block content %}
                        <p>{{ localized.thingsToKnow.listExplained | raw }}</p>
                        <p>{{ localized.thingsToKnow.onWhichElementsDoTheseSettingsHaveAVisualImpact | raw }}</p>
                        <p>
                            <a class="bc-flex bc-justify-center" data-brlbs-modal-target="borlabsModalListSettings" href="#" role="button">
                                <img class="bc-w-48 bc-h-48 bc-rounded-md bc-shadow-md" src="{{ imageUrl('ttk-dialog-appearance-list-settings.png') }}" alt="">
                            </a>
                        </p>
                        {% embed "system/embed/modal/modal.html.twig" with {
                            id: 'borlabsModalListSettings',
                            maxWidth: 'bc-max-w-2xl',
                            title: localized.headline.listSettings,
                        } %}
                            {% 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-list-settings.png') }}" alt="">
                                <p class="bc-text-center">{{ localized.thingsToKnow.listExplained | raw }}</p>
                            {% endblock %}
                        {% endembed %}
                    {% endblock %}
                {% endembed %}
            {% endblock %}
        {% endembed %}
    {% endblock %}
{% endembed %}
