/* 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="ui5-textarea-root" style="${styleMap(context.styles.main)}" @focusin="${context._onfocusin}" @focusout="${context._onfocusout}">${ context.growing ? block1(context, tags, suffix) : undefined }<textarea id="${ifDefined(context._id)}-inner" class="ui5-textarea-inner" placeholder="${ifDefined(context.placeholder)}" ?disabled="${context.disabled}" ?readonly="${context.readonly}" aria-label="${ifDefined(context.ariaLabelText)}" aria-describedby="${ifDefined(context.ariaDescribedBy)}" aria-invalid="${ifDefined(context.ariaInvalid)}" aria-required="${ifDefined(context.required)}" maxlength="${ifDefined(context._exceededTextProps.calcedMaxLength)}" .value="${ifDefined(context.value)}" @input="${context._oninput}" @change="${context._onchange}" @keyup="${context._onkeyup}" @keydown="${context._onkeydown}" data-sap-focus-ref part="textarea"></textarea>${ context.showExceededText ? block3(context, tags, suffix) : undefined }${ context.hasValueState ? block4(context, tags, suffix) : undefined }<slot name="formSupport"></slot></div> `;
const block1 = (context, tags, suffix) => html`<div id="${ifDefined(context._id)}-mirror" style="${styleMap(context.styles.mirror)}" class="ui5-textarea-mirror" aria-hidden="true">${ repeat(context._mirrorText, (item, index) => item._id || index, (item, index) => block2(item, index, context, tags, suffix)) }</div>`;
const block2 = (item, index, context, tags, suffix) => html`${ifDefined(item.text)}<br />`;
const block3 = (context, tags, suffix) => html`<span class="ui5-textarea-exceeded-text">${ifDefined(context._exceededTextProps.exceededText)}</span>`;
const block4 = (context, tags, suffix) => html`<span id="${ifDefined(context._id)}-valueStateDesc" class="ui5-hidden-text">${ifDefined(context.ariaValueStateHiddenText)}</span>`;


export default block0;