{% 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.searchBarSettings,
        }) }}
    {% endblock %}
    {% block mainContent %}
        {{ row_color_duo_selection.component({
            colorA:
            {
                id: 'dialogSearchBarInputBackgroundColor',
                label: localized.field.backgroundColor,
                value: data.dialogSearchBarInputBackgroundColor,
            },
            colorB:
            {
                id: 'dialogSearchBarInputTextColor',
                label: localized.field.textColor,
                value: data.dialogSearchBarInputTextColor,
            },
            title: localized.field.dialogSearchBarInput,
        }) }}

        {{ row_color_duo_selection.component({
            colorA:
            {
                id: 'dialogSearchBarInputBorderColorFocus',
                label: localized.field.focus,
                value: data.dialogSearchBarInputBorderColorFocus,
            },
            colorB:
            {
                id: 'dialogSearchBarInputBorderColorDefault',
                label: localized.field.default,
                value: data.dialogSearchBarInputBorderColorDefault,
            },
            title: localized.field.dialogSearchBarInputBorderColor,
        }) }}

        {% embed "system/embed/form-row.html.twig" %}
            {% import "system/macro/form-component/input-group.html.twig" as input_group %}
            {% block label %}
                <label>{{ localized.field.dialogSearchBarInputBorderWidth | 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: 'dialogSearchBarInputBorderWidthTop',
                            min: 0,
                            value: data.dialogSearchBarInputBorderWidthTop,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogSearchBarInputBorderWidthTop">{{ localized.field.top | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogSearchBarInputBorderWidthRight',
                            min: 0,
                            value: data.dialogSearchBarInputBorderWidthRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogSearchBarInputBorderWidthRight">{{ localized.field.right | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogSearchBarInputBorderWidthBottom',
                            min: 0,
                            value: data.dialogSearchBarInputBorderWidthBottom,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogSearchBarInputBorderWidthBottom">{{ localized.field.bottom | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogSearchBarInputBorderWidthLeft',
                            min: 0,
                            value: data.dialogSearchBarInputBorderWidthLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogSearchBarInputBorderWidthLeft">{{ 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.dialogSearchBarInputBorderRadius | 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: 'dialogSearchBarInputBorderRadiusTopLeft',
                            min: 0,
                            value: data.dialogSearchBarInputBorderRadiusTopLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogSearchBarInputBorderRadiusTopLeft">{{ localized.field.topLeft | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogSearchBarInputBorderRadiusTopRight',
                            min: 0,
                            value: data.dialogSearchBarInputBorderRadiusTopRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogSearchBarInputBorderRadiusTopRight">{{ localized.field.topRight | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogSearchBarInputBorderRadiusBottomLeft',
                            min: 0,
                            value: data.dialogSearchBarInputBorderRadiusBottomLeft,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogSearchBarInputBorderRadiusBottomLeft">{{ localized.field.bottomLeft | raw }}</label>
                    </div>
                    <div class="bc-w-1/4">
                        {{ input_group.component({
                            append: 'px',
                            cssClasses: ['bc-pr-[28px]'],
                            id: 'dialogSearchBarInputBorderRadiusBottomRight',
                            min: 0,
                            value: data.dialogSearchBarInputBorderRadiusBottomRight,
                            type: 'number'
                        }) }}
                        <label class="bc-pt-2" for="dialogSearchBarInputBorderRadiusBottomRight">{{ localized.field.bottomRight | raw }}</label>
                    </div>
                </div>
            {% endblock %}
        {% endembed %}

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