/* 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) => suffix ? html`<div class="ui5-switch-root ${classMap(context.classes.main)}" role="switch" aria-label="${ifDefined(context.ariaLabelText)}" aria-checked="${ifDefined(context.checked)}" aria-disabled="${ifDefined(context.ariaDisabled)}" aria-labelledby="${ifDefined(context._id)}-hiddenText" @click="${context._onclick}" @keyup="${context._onkeyup}" @keydown="${context._onkeydown}" tabindex="${ifDefined(context.tabIndex)}" dir="${ifDefined(context.effectiveDir)}"><div class="ui5-switch-inner"><div class="ui5-switch-track" part="slider"><div class="ui5-switch-slider">${ context.graphical ? block1(context, tags, suffix) : block2(context, tags, suffix) }<span class="ui5-switch-handle" part="handle"><${scopeTag("ui5-icon", tags, suffix)} name="${ifDefined(context.sapNextIcon)}" class="ui5-switch-handle-icon"></${scopeTag("ui5-icon", tags, suffix)}></span></div></div></div><input type='checkbox' ?checked="${context.checked}" class="ui5-switch-input" data-sap-no-tab-ref/><span id="${ifDefined(context._id)}-hiddenText" class="ui5-hidden-text">${ifDefined(context.hiddenText)}</span></div>` : html`<div class="ui5-switch-root ${classMap(context.classes.main)}" role="switch" aria-label="${ifDefined(context.ariaLabelText)}" aria-checked="${ifDefined(context.checked)}" aria-disabled="${ifDefined(context.ariaDisabled)}" aria-labelledby="${ifDefined(context._id)}-hiddenText" @click="${context._onclick}" @keyup="${context._onkeyup}" @keydown="${context._onkeydown}" tabindex="${ifDefined(context.tabIndex)}" dir="${ifDefined(context.effectiveDir)}"><div class="ui5-switch-inner"><div class="ui5-switch-track" part="slider"><div class="ui5-switch-slider">${ context.graphical ? block1(context, tags, suffix) : block2(context, tags, suffix) }<span class="ui5-switch-handle" part="handle"><ui5-icon name="${ifDefined(context.sapNextIcon)}" class="ui5-switch-handle-icon"></ui5-icon></span></div></div></div><input type='checkbox' ?checked="${context.checked}" class="ui5-switch-input" data-sap-no-tab-ref/><span id="${ifDefined(context._id)}-hiddenText" class="ui5-hidden-text">${ifDefined(context.hiddenText)}</span></div>`;
const block1 = (context, tags, suffix) => suffix ? html`<span class="ui5-switch-text ui5-switch-text--on"><${scopeTag("ui5-icon", tags, suffix)} name="accept" dir="ltr" class="ui5-switch-icon-on"></${scopeTag("ui5-icon", tags, suffix)}></span><span class="ui5-switch-text ui5-switch-text--off"><${scopeTag("ui5-icon", tags, suffix)} name="decline" class="ui5-switch-icon-off"></${scopeTag("ui5-icon", tags, suffix)}></span>` : html`<span class="ui5-switch-text ui5-switch-text--on"><ui5-icon name="accept" dir="ltr" class="ui5-switch-icon-on"></ui5-icon></span><span class="ui5-switch-text ui5-switch-text--off"><ui5-icon name="decline" class="ui5-switch-icon-off"></ui5-icon></span>`;
const block2 = (context, tags, suffix) => html`${ context.hasNoLabel ? block3(context, tags, suffix) : block4(context, tags, suffix) }`;
const block3 = (context, tags, suffix) => suffix ? html`<span class="ui5-switch-text ui5-switch-text--on ui5-switch-no-label-icon" part="text-on"><${scopeTag("ui5-icon", tags, suffix)} name="${ifDefined(context.sapNextIcon)}" class="ui5-switch-no-label-icon-on"></${scopeTag("ui5-icon", tags, suffix)}></span><span class="ui5-switch-text ui5-switch-text--off switch-no-label-icon" part="text-off"><${scopeTag("ui5-icon", tags, suffix)} name="${ifDefined(context.sapNextIcon)}" class="ui5-switch-no-label-icon-off"></${scopeTag("ui5-icon", tags, suffix)}></span>` : html`<span class="ui5-switch-text ui5-switch-text--on ui5-switch-no-label-icon" part="text-on"><ui5-icon name="${ifDefined(context.sapNextIcon)}" class="ui5-switch-no-label-icon-on"></ui5-icon></span><span class="ui5-switch-text ui5-switch-text--off switch-no-label-icon" part="text-off"><ui5-icon name="${ifDefined(context.sapNextIcon)}" class="ui5-switch-no-label-icon-off"></ui5-icon></span>`;
const block4 = (context, tags, suffix) => html`<span class="ui5-switch-text ui5-switch-text--on" part="text-on">${ifDefined(context._textOn)}</span><span class="ui5-switch-text ui5-switch-text--off" part="text-off">${ifDefined(context._textOff)}</span>`;


export default block0;