<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
    <t t-name="web_editor.snippet_overlay">
        <div class="oe_overlay o_handlers_idle">
            <div class="o_handles">
                <!-- Visible overlay borders + allow to resize when not readonly -->
                <div class="o_handle o_column_handle o_side o_side_y n readonly"><span class="o_handle_indicator"/></div>
                <div class="o_handle o_column_handle o_side o_side_x e readonly"><span class="o_handle_indicator"/></div>
                <div class="o_handle o_column_handle o_side o_side_x w readonly"><span class="o_handle_indicator"/></div>
                <div class="o_handle o_column_handle o_side o_side_y s readonly"><span class="o_handle_indicator"/></div>

                <!-- Grid resize handles -->
                <div class="o_handle o_grid_handle o_side o_side_y n d-none"><span class="o_handle_indicator"/></div>
                <div class="o_handle o_grid_handle o_side o_side_x e d-none"><span class="o_handle_indicator"/></div>
                <div class="o_handle o_grid_handle o_side o_side_x w d-none"><span class="o_handle_indicator"/></div>
                <div class="o_handle o_grid_handle o_side o_side_y s d-none"><span class="o_handle_indicator"/></div>
                <div class="o_handle o_grid_handle o_corner_handle ne d-none"><span class="o_handle_indicator"/></div>
                <div class="o_handle o_grid_handle o_corner_handle nw d-none"><span class="o_handle_indicator"/></div>
                <div class="o_handle o_grid_handle o_corner_handle se d-none"><span class="o_handle_indicator"/></div>
                <div class="o_handle o_grid_handle o_corner_handle sw d-none"><span class="o_handle_indicator"/></div>

                <div class="o_overlay_options_wrap">
                    <!-- Overlay move specific section -->
                    <div class="o_overlay_move_options">
                        <!-- Button-like handle to drag and drop -->
                        <div class="o_front_back o_send_back d-none"/>
                        <div class="o_front_back o_bring_front d-none"/>
                        <div class="o_move_handle fa fa-arrows"/>
                    </div>
                    <div class="o_overlay_edit_options">
                        <button type="button" class="oe_snippet_remove o_we_bg_danger fa fa-trash"/>
                    </div>
                </div>
            </div>
        </div>
    </t>
    <t t-name="web_editor.customize_block_options_section">
        <we-customizeblock-options>
            <we-title>
                <span t-esc="name"/>
                <we-top-button-group>
                    <we-button class="fa fa-fw fa-clone oe_snippet_clone o_we_link o_we_hover_success"
                                title="Duplicate Container"
                                aria-label="Duplicate Container"/>
                    <we-button class="fa fa-fw fa-trash oe_snippet_remove o_we_link o_we_hover_danger"
                                title="Remove Block"
                                aria-label="Remove Block"/>
                </we-top-button-group>
            </we-title>
        </we-customizeblock-options>
    </t>
    <t t-name="web_editor.outdated_block_message">
        <we-alert class="d-flex flex-column p-3 pt-4 align-items-center text-center text-white">
            <we-title>This block is outdated.</we-title>
            <span>You might not be able to customize it anymore.</span>
            <we-button class="o_we_bg_brand_primary py-2 my-4 border-0" data-no-preview="true" data-replace-snippet="">REPLACE BY NEW VERSION</we-button>
            <span>You can still access the block options but it might be ineffective.</span>
            <we-button class="o_we_bg_brand_primary py-2 my-4 border-0" data-no-preview="true" data-discard-alert="">ACCESS OPTIONS ANYWAY</we-button>
        </we-alert>
    </t>

    <!-- options -->
    <div t-name="web_editor.ColorPalette" class="colorpicker" t-ref="el" t-on-click="this._onColorpickerClick">
        <div class="o_we_colorpicker_switch_panel d-flex justify-content-end px-2">
            <t t-set="first_button_name"><t t-if="props.withCombinations">Theme</t><t t-else="">Solid</t></t>
            <button type="button" tabindex="1" class="o_we_colorpicker_switch_pane_btn" t-attf-data-target="#{props.withCombinations ? 'color-combinations' : 'theme-colors'}"
                    t-att-title="first_button_name"
                    t-on-click="this._onSwitchPaneButtonClick">
                <span t-out="first_button_name"/>
            </button>
            <button type="button" tabindex="2" class="o_we_colorpicker_switch_pane_btn" data-target="custom-colors" title="Custom"
                    t-on-click="this._onSwitchPaneButtonClick">
                <span>Custom</span>
            </button>
            <button type="button" tabindex="3" class="o_we_colorpicker_switch_pane_btn" data-target="gradients" title="Gradient"
                    t-on-click="this._onSwitchPaneButtonClick">
                <span>Gradient</span>
            </button>
            <t t-if="props.resetButton">
                <t t-set="trash_title"><t t-if="props.withCombinations">None</t><t t-else="">Reset</t></t>
                <button type="button" class="fa fa-trash my-1 ms-5 py-0 o_we_color_btn o_colorpicker_reset o_we_hover_danger" t-att-title="trash_title" />
            </t>
        </div>
        <div class="o_colorpicker_sections pt-2 px-2 pb-3" data-color-tab="color-combinations">
            <!-- List all Presets -->
            <t t-foreach="[1, 2, 3, 4, 5]" t-as="number" t-key="number">
                <button type="button" class="o_we_color_btn o_we_color_combination_btn"
                        t-att-data-color="number" t-attf-title="Preset #{number}">
                    <t t-call="web_editor.color.combination.preview"/>
                </button>
            </t>
        </div>
        <div class="o_colorpicker_sections py-3 px-2" data-color-tab="theme-colors"/>
        <div class="o_colorpicker_sections py-3 px-2" data-color-tab="custom-colors">
            <div class="o_colorpicker_section_container"/>
            <t t-if="!this.props.excluded.includes('custom')">
                <Colorpicker
                    document="this.props.document"
                    defaultColor="this.state.customDefaultColor"
                    noTransparency="!!this.props.noTransparency"
                    selectedColor="this.state.customSelectedColor"
                    onColorSelect.bind="_onColorPickerSelect"
                    onColorPreview.bind="_onColorPickerPreview"
                    onInputEnter="props.onInputEnter"/>
            </t>
        </div>
        <div class="o_colorpicker_sections py-3 px-2" data-color-tab="gradients">
            <div class="o_colorpicker_section_container"/>
            <t t-if="state.showGradientPicker">
                <Colorpicker
                    document="this.props.document"
                    stopClickPropagation="true"
                    selectedColor="this.state.gradientSelectedColor"
                    onColorSelect.bind="_onColorPickerSelectGradient"
                    onColorPreview.bind="_onColorPickerPreviewGradient"
                    onInputEnter="props.onInputEnter"/>
            </t>
        </div>
    </div>
    <t t-name="web_editor.color.combination.preview">
        <div class="o_we_cc_preview_wrapper d-flex justify-content-between">
            <h1 class="o_we_color_combination_btn_title">Title</h1>
            <p class="o_we_color_combination_btn_text flex-grow-1">Text</p>
            <span class="o_we_color_combination_btn_btn btn btn-sm btn-primary o_btn_preview me-1"><small>Button</small></span>
            <span class="o_we_color_combination_btn_btn btn btn-sm btn-secondary o_btn_preview"><small>Button</small></span>
        </div>
    </t>
    <t t-name="web_editor.color.combination.preview.legacy">
        <div class="o_we_cc_preview_wrapper d-flex justify-content-between">
            <h1 class="o_we_color_combination_btn_title">Title</h1>
            <p class="o_we_color_combination_btn_text flex-grow-1">Text</p>
            <span class="o_we_color_combination_btn_btn btn btn-sm btn-primary o_btn_preview me-1"><small>Button</small></span>
            <span class="o_we_color_combination_btn_btn btn btn-sm btn-secondary o_btn_preview"><small>Button</small></span>
        </div>
    </t>

</templates>
