/* eslint no-unused-vars: 0 */
import { html, svg, repeat, classMap, styleMap, ifDefined, unsafeHTML, scopeTag } from "@gsmlg/ui5-webcomponents-base/dist/renderer/LitRenderer.js";

const block0 = (context, tags, suffix) => html`<div class="${classMap(context.classes.colorPaletteRoot)}" @click=${context._onclick} @keyup=${context._onkeyup} @keydown=${context._onkeydown}>${ context.showDefaultColor ? block1(context, tags, suffix) : undefined }<div class="ui5-cp-item-container" role="region" aria-label="${ifDefined(context.colorContainerLabel)}" @keydown="${context._onColorContainerKeyDown}">${ repeat(context.displayedColors, (item, index) => item._id || index, (item, index) => block2(item, index, context, tags, suffix)) }</div>${ context._showMoreColors ? block3(context, tags, suffix) : undefined }${ context.showRecentColors ? block4(context, tags, suffix) : undefined }</div>`;
const block1 = (context, tags, suffix) => suffix ? html`<div class="ui5-cp-default-color-button-wrapper"><${scopeTag("ui5-button", tags, suffix)} class="ui5-cp-default-color-button" design="Transparent" @click=${context._onDefaultColorClick} @keydown=${context._onDefaultColorKeyDown}>Default color</${scopeTag("ui5-button", tags, suffix)}><div class="ui5-cp-separator"></div></div>` : html`<div class="ui5-cp-default-color-button-wrapper"><ui5-button class="ui5-cp-default-color-button" design="Transparent" @click=${context._onDefaultColorClick} @keydown=${context._onDefaultColorKeyDown}>Default color</ui5-button><div class="ui5-cp-separator"></div></div>`;
const block2 = (item, index, context, tags, suffix) => html`<slot name="${ifDefined(item._individualSlot)}"></slot>`;
const block3 = (context, tags, suffix) => suffix ? html`<div class="ui5-cp-more-colors-wrapper"><div class="ui5-cp-separator"></div><${scopeTag("ui5-button", tags, suffix)} design="Transparent" class="ui5-cp-more-colors" @click="${context._openMoreColorsDialog}" @keydown=${context._onMoreColorsKeyDown}>${ifDefined(context.colorPaleteMoreColorsText)}</${scopeTag("ui5-button", tags, suffix)}></div>` : html`<div class="ui5-cp-more-colors-wrapper"><div class="ui5-cp-separator"></div><ui5-button design="Transparent" class="ui5-cp-more-colors" @click="${context._openMoreColorsDialog}" @keydown=${context._onMoreColorsKeyDown}>${ifDefined(context.colorPaleteMoreColorsText)}</ui5-button></div>`;
const block4 = (context, tags, suffix) => html`<div class="ui5-cp-recent-colors-wrapper"><div class="ui5-cp-separator"></div><div class="ui5-cp-recent-colors-container" @keydown="${context._onRecentColorsContainerKeyDown}">${ repeat(context.recentColors, (item, index) => item._id || index, (item, index) => block5(item, index, context, tags, suffix)) }</div></div>`;
const block5 = (item, index, context, tags, suffix) => suffix ? html`<${scopeTag("ui5-color-palette-item", tags, suffix)} value="${ifDefined(item)}"></${scopeTag("ui5-color-palette-item", tags, suffix)}>` : html`<ui5-color-palette-item value="${ifDefined(item)}"></ui5-color-palette-item>`;


export default block0;