/* 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`${ context._isPhone ? block1(context, tags, suffix) : block7(context, tags, suffix) }`;
const block1 = (context, tags, suffix) => suffix ? html`<${scopeTag("ui5-dialog", tags, suffix)} accessible-name=${ifDefined(context.accessibleName)} accessible-name-ref=${ifDefined(context.accessibleNameRef)} stretch _disable-initial-focus @ui5-before-open="${ifDefined(context._beforeDialogOpen)}" @ui5-after-open="${ifDefined(context._propagateDialogEvent)}" @ui5-before-close="${ifDefined(context._propagateDialogEvent)}" @ui5-after-close="${ifDefined(context._afterDialogClose)}" exportparts="content, header, footer">${ !context._hideHeader ? block2(context, tags, suffix) : undefined }<slot></slot><slot slot="footer" name="footer"></slot></${scopeTag("ui5-dialog", tags, suffix)}>` : html`<ui5-dialog accessible-name=${ifDefined(context.accessibleName)} accessible-name-ref=${ifDefined(context.accessibleNameRef)} stretch _disable-initial-focus @ui5-before-open="${ifDefined(context._beforeDialogOpen)}" @ui5-after-open="${ifDefined(context._propagateDialogEvent)}" @ui5-before-close="${ifDefined(context._propagateDialogEvent)}" @ui5-after-close="${ifDefined(context._afterDialogClose)}" exportparts="content, header, footer">${ !context._hideHeader ? block2(context, tags, suffix) : undefined }<slot></slot><slot slot="footer" name="footer"></slot></ui5-dialog>`;
const block2 = (context, tags, suffix) => html`${ context.header.length ? block3(context, tags, suffix) : block4(context, tags, suffix) }`;
const block3 = (context, tags, suffix) => html`<slot slot="header" name="header"></slot>`;
const block4 = (context, tags, suffix) => html`<div class="${classMap(context.classes.header)}" slot="header">${ context.headerText ? block5(context, tags, suffix) : undefined }${ !context._hideCloseButton ? block6(context, tags, suffix) : undefined }</div>`;
const block5 = (context, tags, suffix) => suffix ? html`<${scopeTag("ui5-title", tags, suffix)} level="H2" class="ui5-popup-header-text ui5-responsive-popover-header-text">${ifDefined(context.headerText)}</${scopeTag("ui5-title", tags, suffix)}>` : html`<ui5-title level="H2" class="ui5-popup-header-text ui5-responsive-popover-header-text">${ifDefined(context.headerText)}</ui5-title>`;
const block6 = (context, tags, suffix) => suffix ? html`<${scopeTag("ui5-button", tags, suffix)} icon="decline" design="Transparent" aria-label="${ifDefined(context._closeDialogAriaLabel)}" @click="${context.close}"></${scopeTag("ui5-button", tags, suffix)}>` : html`<ui5-button icon="decline" design="Transparent" aria-label="${ifDefined(context._closeDialogAriaLabel)}" @click="${context.close}"></ui5-button>`;
const block7 = (context, tags, suffix) => html`<section style="${styleMap(context.styles.root)}" class="${classMap(context.classes.root)}" role="dialog" aria-modal="${ifDefined(context._ariaModal)}" aria-label="${ifDefined(context._ariaLabel)}" aria-labelledby="${ifDefined(context._ariaLabelledBy)}" dir="${ifDefined(context.effectiveDir)}" @keydown=${context._onkeydown} @focusout=${context._onfocusout} @mouseup=${context._onmouseup} @mousedown=${context._onmousedown}><span class="first-fe" data-ui5-focus-trap tabindex="0" @focusin=${context.forwardToLast}></span><span class="ui5-popover-arrow" style="${styleMap(context.styles.arrow)}"></span>${ context._displayHeader ? block8(context, tags, suffix) : undefined }<div style="${styleMap(context.styles.content)}" class="${classMap(context.classes.content)}"  @scroll="${context._scroll}" part="content"><slot></slot></div>${ context._displayFooter ? block11(context, tags, suffix) : undefined }<span class="last-fe" data-ui5-focus-trap tabindex="0" @focusin=${context.forwardToFirst}></span></section>`;
const block8 = (context, tags, suffix) => html`<header class="ui5-popup-header-root" id="ui5-popup-header" part="header">${ context.header.length ? block9(context, tags, suffix) : block10(context, tags, suffix) }</header>`;
const block9 = (context, tags, suffix) => html`<slot name="header"></slot>`;
const block10 = (context, tags, suffix) => html`<h2 class="ui5-popup-header-text">${ifDefined(context.headerText)}</h2>`;
const block11 = (context, tags, suffix) => html`${ context.footer.length ? block12(context, tags, suffix) : undefined }`;
const block12 = (context, tags, suffix) => html`<footer class="ui5-popup-footer-root" part="footer"><slot name="footer"></slot></footer>`;


export default block0;