/*!
 * KoliBri - The accessible HTML-Standard
 */
import { h, proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
import { a as __rest, _ as __decorate } from './tslib.es6.js';
import { c as clsx } from './clsx.js';
import { a as getMsgType, i as isMsgDefinedAndInputTouched, c as getDefaultProps, g as getRenderStates, F as FormFieldStateWrapper } from './controller3.js';
import { I as InputIconController, a as InputContainerStateWrapperFc } from './controller-icon.js';
import './common.js';
import { a as watchValidator, h as watchString } from './prop.validators.js';
import { a as createRelatedUniqueId, c as createUniqueId } from './dev.utils.js';
import { c as createCtaRef, d as delegateFocus, a as delegateClick } from './element-interaction.js';
import { a as validateHasCounter, v as validateMaxLengthBehavior, b as validateMaxLength } from './max-length-behavior.js';
import { v as validatePlaceholder } from './placeholder.js';
import { v as validateReadOnly } from './read-only.js';
import { v as validateRequired } from './required.js';
import { v as validateRows } from './rows.js';
import { v as validateSpellCheck } from './spell-check.js';

const textareaResizeOptions = ['vertical', 'none'];
const isTextareaResizePropType = (value) => {
    return typeof value === 'string' && textareaResizeOptions.includes(value);
};
const validateResizeTextarea = (component, value) => {
    watchValidator(component, '_resize', isTextareaResizePropType, new Set(textareaResizeOptions), value, {
        defaultValue: 'vertical',
    });
};

const TextAreaFc = (props) => {
    const { class: classNames, msg, touched, readonly, disabled, required, ariaDescribedBy, hideLabel, label } = props, other = __rest(props, ["class", "msg", "touched", "readonly", "disabled", "required", "ariaDescribedBy", "hideLabel", "label"]);
    const stateCssClasses = {
        ['kol-textarea--disabled']: Boolean(disabled),
        ['kol-textarea--required']: Boolean(required),
        ['kol-textarea--touched']: Boolean(touched),
        ['kol-textarea--readonly']: Boolean(readonly),
        [`kol-textarea--${getMsgType(msg)}`]: isMsgDefinedAndInputTouched(msg, touched),
    };
    const inputProps = Object.assign(Object.assign({ class: clsx('kol-textarea', stateCssClasses, classNames), required: required, disabled: disabled, readonly: readonly }, getDefaultProps({ ariaDescribedBy, hideLabel, label })), other);
    return h("textarea", Object.assign({}, inputProps));
};

function getTextAreaProps(state, other) {
    var _a;
    const renderStates = getRenderStates(state);
    const ariaDescribedBy = [...renderStates.ariaDescribedBy, ...((_a = other.ariaDescribedBy) !== null && _a !== void 0 ? _a : [])];
    const props = Object.assign(Object.assign({ id: state._id, hideLabel: state._hideLabel, label: state._label, value: state._value, accessKey: state._accessKey, disabled: state._disabled, name: state._name, rows: state._rows, readonly: state._readOnly, required: state._required, placeholder: state._placeholder, touched: state._touched, msg: state._msg }, other), { ariaDescribedBy });
    if ('_maxLength' in state && '_maxLengthBehavior' in state && state._maxLengthBehavior === 'hard') {
        props.maxLength = state._maxLength;
    }
    if ('_shortKey' in state)
        props['aria-keyshortcuts'] = state._shortKey;
    return props;
}
const TextAreaStateWrapper = (_a) => {
    var { state } = _a, other = __rest(_a, ["state"]);
    return h(TextAreaFc, Object.assign({}, getTextAreaProps(state, other)));
};

class TextareaController extends InputIconController {
    constructor(component, name, host) {
        super(component, name, host);
        this.afterSyncCharCounter = () => {
            if (typeof this.component._value === 'string') {
                this.component.state._currentLength = this.component._value.length;
                this.updateCurrentLengthDebounced(this.component._value.length);
            }
        };
        this.component = component;
    }
    validateHasCounter(value) {
        validateHasCounter(this.component, value);
    }
    validateMaxLengthBehavior(value) {
        validateMaxLengthBehavior(this.component, value);
    }
    validateMaxLength(value) {
        validateMaxLength(this.component, value, {
            hooks: { afterPatch: this.afterSyncCharCounter },
        });
    }
    validatePlaceholder(value) {
        validatePlaceholder(this.component, value);
    }
    validateReadOnly(value) {
        validateReadOnly(this.component, value);
    }
    validateResize(value) {
        validateResizeTextarea(this.component, value);
    }
    validateRequired(value) {
        validateRequired(this.component, value);
    }
    validateRows(value) {
        validateRows(this.component, value);
    }
    validateSpellCheck(value) {
        validateSpellCheck(this.component, value);
    }
    validateValue(value) {
        watchString(this.component, '_value', value, {
            hooks: {
                afterPatch: this.afterSyncCharCounter,
            },
        });
        this.setFormAssociatedValue(this.component._value);
    }
    componentWillLoad() {
        super.componentWillLoad();
        this.validateHasCounter(this.component._hasCounter);
        this.validateMaxLengthBehavior(this.component._maxLengthBehavior);
        this.validateMaxLength(this.component._maxLength);
        this.validatePlaceholder(this.component._placeholder);
        this.validateReadOnly(this.component._readOnly);
        this.validateRequired(this.component._required);
        this.validateResize(this.component._resize);
        this.validateRows(this.component._rows);
        this.validateSpellCheck(this.component._spellCheck);
        this.validateValue(this.component._value);
    }
}

const defaultStyleCss = "@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n  :host {\n    /*\n                   * Minimum size of interactive elements.\n                   */\n    --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n    /*\n     * No element should be used without verifying the contrast ratio of its background and font colors.\n     * By initially setting the background color to white and the font color to black,\n     * the contrast ratio is ensured and explicit adjustment is forced.\n     */\n    color: black;\n    background-color: white;\n    /*\n     * Verdana is an accessible font that can be used without requiring additional loading time.\n     */\n    font-family: Verdana;\n    /*\n     * Letter spacing is required for all texts.\n     */\n    letter-spacing: inherit;\n    /*\n     * Word spacing is required for all texts.\n     */\n    word-spacing: inherit;\n    /*\n     * Text should be aligned left by default to provide a predictable starting point.\n     */\n    text-align: left;\n  }\n  * {\n    /*\n     * This rule enables the word dividing for all texts. That is important for high zoom levels.\n     */\n    hyphens: auto;\n    /*\n     * This rule enables the word dividing for all texts. That is important for high zoom levels.\n     */\n    word-break: break-word;\n  }\n  /*\n   * All interactive elements should have a minimum size of to-rem(44).\n   */\n  /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n  /* option, */\n  /* select, */\n  /* textarea, */\n  button,\n  .kol-input .input {\n    min-width: var(--a11y-min-size);\n    min-height: var(--a11y-min-size);\n  }\n  /*\n   * Some interactive elements should not inherit the font-family and font-size.\n   */\n  a,\n  button,\n  h1,\n  h2,\n  h3,\n  h4,\n  h5,\n  h6,\n  input,\n  option,\n  select,\n  textarea {\n    /*\n     * All elements should inherit the text color from his parent element.\n     */\n    color: inherit;\n    /*\n     * All elements should inherit the font family from his parent element.\n     */\n    font-family: inherit;\n    /*\n     * All elements should inherit the font size from his parent element.\n     */\n    font-size: inherit;\n    /*\n     * Letter spacing is required for all texts.\n     */\n    letter-spacing: inherit;\n    /*\n     * Word spacing is required for all texts.\n     */\n    word-spacing: inherit;\n  }\n  /**\n  * Sometimes we need the semantic element for accessibility reasons,\n  * but we don't want to show it.\n  *\n  * - https://www.a11yproject.com/posts/how-to-hide-content/\n  */\n  .visually-hidden {\n    position: fixed;\n    top: 0;\n    left: 0;\n    width: 1px;\n    height: 1px;\n    overflow: hidden;\n    white-space: nowrap;\n    clip-path: inset(50%);\n  }\n}\n@layer kol-global {\n  /*\n   * Dieses CSS stellt sicher, dass der Standard-Style\n   * von A und Button resettet werden.\n   */\n  :is(a, button) {\n    background-color: transparent;\n    width: 100%;\n    margin: 0;\n    padding: 0;\n    border: none;\n    /* 100% needed for custom width from outside */\n  }\n  /*\n   * Ensure elements with hidden attribute to be actually not visible\n   * @see https://meowni.ca/hidden.is.a.lie.html\n   */\n  [hidden] {\n    display: none !important;\n  }\n  .badge-text-hint {\n    color: black;\n    background-color: white;\n  }\n}\n@layer kol-global {\n  :host {\n    /*\n     * The max-width is needed to prevent the table from overflowing the\n     * parent node, if the table is wider than the parent node.\n     */\n    max-width: 100%;\n    font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n  }\n  * {\n    /*\n     * We prefer to box-sizing: border-box for all elements.\n     */\n    box-sizing: border-box;\n  }\n  .kol-span {\n    /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n    display: flex;\n    flex-flow: column;\n    align-items: center;\n    justify-content: center;\n    /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n  }\n  .kol-span__container {\n    display: flex;\n    align-items: center;\n  }\n  a,\n  button {\n    cursor: pointer;\n  }\n  .kol-span .kol-span__label--hide-label .kol-span__label {\n    display: none;\n  }\n  /* Reset browser agent style. */\n  button:disabled {\n    color: unset;\n  }\n  .disabled label,\n  .disabled:focus-within label,\n  [aria-disabled=true],\n  [aria-disabled=true]:focus,\n  [disabled],\n  [disabled]:focus {\n    outline: none;\n    cursor: not-allowed;\n  }\n  [aria-disabled=true]:focus .kol-span,\n  [disabled]:focus .kol-span {\n    outline: none !important;\n  }\n  .hastooltip {\n    z-index: 900 !important;\n  }\n}\n@layer kol-component {\n  :host {\n    display: block;\n  }\n}\n@font-face {\n  font-family: \"kolicons\";\n  src: url(\"kolicons.eot?t=1780914078349\"); /* IE9*/\n  src: url(\"kolicons.eot?t=1780914078349#iefix\") format(\"embedded-opentype\"), url(\"kolicons.woff2?t=1780914078349\") format(\"woff2\"), url(\"kolicons.woff?t=1780914078349\") format(\"woff\"), url(\"kolicons.ttf?t=1780914078349\") format(\"truetype\"), url(\"kolicons.svg?t=1780914078349#kolicons\") format(\"svg\"); /* iOS 4.1- */\n}\n@layer kol-component {\n  [class^=kolicon-], [class*=\" kolicon-\"] {\n    font-family: \"kolicons\";\n    font-style: normal;\n    font-weight: 400;\n    line-height: 1em;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n  .kolicon-alert-error::before {\n    content: \"\\ea01\";\n  }\n  .kolicon-alert-info::before {\n    content: \"\\ea02\";\n  }\n  .kolicon-alert-success::before {\n    content: \"\\ea03\";\n  }\n  .kolicon-alert-warning::before {\n    content: \"\\ea04\";\n  }\n  .kolicon-check::before {\n    content: \"\\ea05\";\n  }\n  .kolicon-chevron-double-left::before {\n    content: \"\\ea06\";\n  }\n  .kolicon-chevron-double-right::before {\n    content: \"\\ea07\";\n  }\n  .kolicon-chevron-down::before {\n    content: \"\\ea08\";\n  }\n  .kolicon-chevron-left::before {\n    content: \"\\ea09\";\n  }\n  .kolicon-chevron-right::before {\n    content: \"\\ea0a\";\n  }\n  .kolicon-chevron-up::before {\n    content: \"\\ea0b\";\n  }\n  .kolicon-cogwheel::before {\n    content: \"\\ea0c\";\n  }\n  .kolicon-cross::before {\n    content: \"\\ea0d\";\n  }\n  .kolicon-eye-closed::before {\n    content: \"\\ea0e\";\n  }\n  .kolicon-eye::before {\n    content: \"\\ea0f\";\n  }\n  .kolicon-house::before {\n    content: \"\\ea10\";\n  }\n  .kolicon-kolibri::before {\n    content: \"\\ea11\";\n  }\n  .kolicon-link-external::before {\n    content: \"\\ea12\";\n  }\n  .kolicon-link::before {\n    content: \"\\ea13\";\n  }\n  .kolicon-minus::before {\n    content: \"\\ea14\";\n  }\n  .kolicon-plus::before {\n    content: \"\\ea15\";\n  }\n  .kolicon-settings::before {\n    content: \"\\ea16\";\n  }\n  .kolicon-sort-asc::before {\n    content: \"\\ea17\";\n  }\n  .kolicon-sort-desc::before {\n    content: \"\\ea18\";\n  }\n  .kolicon-sort-neutral::before {\n    content: \"\\ea19\";\n  }\n  .kolicon-up::before {\n    content: \"\\ea1a\";\n  }\n  .kolicon-version::before {\n    content: \"\\ea1b\";\n  }\n}\n@layer kol-component {\n  .kol-icon {\n    color: inherit;\n    display: inline-block;\n    font-size: inherit;\n    font-weight: inherit;\n    line-height: inherit;\n  }\n  .kol-tooltip {\n    display: contents;\n  }\n  .kol-tooltip__floating {\n    opacity: 0;\n    display: none;\n    position: fixed;\n    /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n    top: 0;\n    left: 0;\n    /* Can be used to specify the tooltip-width from the outside. Unset by default.  */\n    width: var(--kol-tooltip-width, max-content);\n    min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n    max-width: 90vw;\n    max-height: 90vh;\n    animation-direction: normal;\n    /* Can be used to specify the animation duration from the outside. 250ms by default. */\n    animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n    animation-fill-mode: forwards;\n    animation-iteration-count: 1;\n    animation-timing-function: ease-in;\n  }\n  .kol-tooltip__floating.hide {\n    animation-name: hideTooltip;\n  }\n  .kol-tooltip__floating.show {\n    animation-name: showTooltip;\n  }\n  .kol-tooltip__arrow {\n    transform: rotate(45deg);\n    color: black;\n    background-color: white;\n    position: absolute;\n    z-index: 999;\n    width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n    height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n  }\n  .kol-tooltip__content {\n    color: black;\n    background-color: white;\n    position: relative;\n    z-index: 1000;\n  }\n  @keyframes hideTooltip {\n    0% {\n      opacity: 1;\n    }\n    100% {\n      opacity: 0;\n      display: none;\n    }\n  }\n  @keyframes showTooltip {\n    0% {\n      opacity: 0;\n    }\n    100% {\n      opacity: 1;\n    }\n  }\n}\n@layer kol-component {\n  .kol-alert .kol-icon {\n    color: inherit;\n    display: inline-block;\n    font-size: inherit;\n    font-weight: inherit;\n    line-height: inherit;\n  }\n  .kol-alert :host {\n    display: inline-block;\n  }\n  .kol-alert .kol-button {\n    display: flex;\n    min-height: var(--a11y-min-size);\n    font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n    text-decoration-line: none;\n  }\n  .kol-alert .kol-button::before {\n    /* Render zero-width character as first element to set the baseline correctly. */\n    content: \"​\";\n  }\n  .kol-alert .kol-button__text {\n    flex: 1 0 100%;\n  }\n  .kol-alert {\n    display: grid;\n  }\n  .kol-alert__container {\n    display: flex;\n    place-items: center;\n  }\n  .kol-alert__container-content {\n    flex-grow: 1;\n  }\n  .kol-alert__closer {\n    /* Visible with forced colors */\n    outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n  }\n  .kol-form-field {\n    display: grid;\n  }\n  .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n    cursor: pointer;\n  }\n  .kol-form-field__label-text {\n    flex-flow: row;\n    align-items: flex-start;\n    justify-content: flex-start;\n  }\n  .kol-form-field--required .kol-form-field__label-text:has(.kol-span__slot[hidden])::after,\n  .kol-form-field--required .kol-tooltip__content .kol-span__label::after {\n    content: \"*\"/\"\";\n  }\n  .kol-input-container {\n    background-color: transparent;\n    display: grid;\n    position: relative;\n    width: 100%;\n    min-width: var(--a11y-min-size);\n    min-height: var(--a11y-min-size);\n    align-items: center;\n    grid-template-columns: 1fr;\n  }\n  .kol-input-container:has(> .kol-input-container__adornment--start) {\n    grid-template-columns: auto 1fr auto;\n  }\n  .kol-input-container__container {\n    position: relative;\n    z-index: 1;\n  }\n  .kol-input-container__adornment {\n    display: flex;\n    align-items: center;\n  }\n  .kol-input-container__adornment .kol-icon {\n    display: grid;\n    min-height: var(--a11y-min-size);\n    place-items: center;\n  }\n  .kol-textarea {\n    width: 100%;\n  }\n  .kol-textarea:focus {\n    outline: none;\n  }\n}";

const increaseTextareaHeight = (el) => {
    el.style.overflow = 'hidden';
    const currentRows = el.rows;
    const rowHeight = el.clientHeight / currentRows;
    el.rows = 1;
    const nextRows = Math.round(el.scrollHeight / rowHeight);
    el.rows = currentRows;
    return nextRows;
};
const KolTextarea$1 = proxyCustomElement(class KolTextarea extends HTMLElement {
    async getValue() {
        var _a;
        return (_a = this.ctaRef.el) === null || _a === void 0 ? void 0 : _a.value;
    }
    async focus(options) { }
    async click() { }
    getFormFieldProps() {
        return {
            state: this.state,
            class: clsx('kol-form-field-textarea', {
                'kol-form-field--has-value': this.state._hasValue,
                'kol-form-field--has-counter': this.controller.hasSoftCharacterLimit() || this.controller.hasCounter(),
            }),
            tooltipAlign: this._tooltipAlign,
            alert: this.showAsAlert(),
        };
    }
    getTextAreaProps() {
        const ariaDescribedBy = typeof this.state._maxLength === 'number' ? [createRelatedUniqueId(this.state._id, 'character-limit-hint')] : undefined;
        return Object.assign(Object.assign({ ref: this.ctaRef, state: this.state, style: {
                resize: this.state._resize,
            }, ariaDescribedBy }, this.controller.onFacade), { onInput: this.onInput, onFocus: (event) => {
                this.controller.onFacade.onFocus(event);
                this.inputHasFocus = true;
            }, onBlur: (event) => {
                this.controller.onFacade.onBlur(event);
                this.inputHasFocus = false;
            } });
    }
    render() {
        return (h(FormFieldStateWrapper, Object.assign({ key: 'c82369a69d4ce7d08ee0a63642623afceb4b007b' }, this.getFormFieldProps()), h(InputContainerStateWrapperFc, { key: 'ef1f50a4f3bc366cddf7b999a11fc9e34b6e9581', state: this.state }, h(TextAreaStateWrapper, Object.assign({ key: '9b89da329cee83168237b2e803e5c386376d89ae' }, this.getTextAreaProps())))));
    }
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        this.__attachShadow();
        this.ctaRef = createCtaRef();
        this._adjustHeight = false;
        this._disabled = false;
        this._hideMsg = false;
        this._hideLabel = false;
        this._hint = '';
        this._hasCounter = false;
        this._maxLengthBehavior = 'hard';
        this._readOnly = false;
        this._resize = 'vertical';
        this._required = false;
        this._tooltipAlign = 'top';
        this._touched = false;
        this.state = {
            _adjustHeight: false,
            _currentLength: 0,
            _currentLengthDebounced: 0,
            _hasValue: false,
            _hideMsg: false,
            _id: createUniqueId('textarea'),
            _label: '',
            _resize: 'vertical',
        };
        this.inputHasFocus = false;
        this.onInput = (event) => {
            if (this.ctaRef.el instanceof HTMLTextAreaElement) {
                this._value = this.ctaRef.el.value;
                if (this.state._adjustHeight) {
                    this._rows = increaseTextareaHeight(this.ctaRef.el);
                }
                this.controller.onFacade.onInput(event);
            }
        };
        this.controller = new TextareaController(this, 'textarea', this.host);
    }
    showAsAlert() {
        return Boolean(this.state._touched) && !this.inputHasFocus;
    }
    validateAccessKey(value) {
        this.controller.validateAccessKey(value);
    }
    validateAdjustHeight(value) {
        this.controller.validateAdjustHeight(value);
    }
    validateDisabled(value) {
        this.controller.validateDisabled(value);
    }
    validateHideMsg(value) {
        this.controller.validateHideMsg(value);
    }
    validateHideLabel(value) {
        this.controller.validateHideLabel(value);
    }
    validateHasCounter(value) {
        this.controller.validateHasCounter(value);
    }
    validateHint(value) {
        this.controller.validateHint(value);
    }
    validateIcons(value) {
        this.controller.validateIcons(value);
    }
    validateLabel(value) {
        this.controller.validateLabel(value);
    }
    validateMaxLength(value) {
        this.controller.validateMaxLength(value);
    }
    validateMaxLengthBehavior(value) {
        this.controller.validateMaxLengthBehavior(value);
    }
    validateMsg(value) {
        this.controller.validateMsg(value);
    }
    validateName(value) {
        this.controller.validateName(value);
    }
    validateOn(value) {
        this.controller.validateOn(value);
    }
    validatePlaceholder(value) {
        this.controller.validatePlaceholder(value);
    }
    validateReadOnly(value) {
        this.controller.validateReadOnly(value);
    }
    validateResize(value) {
        this.controller.validateResize(value);
    }
    validateRequired(value) {
        this.controller.validateRequired(value);
    }
    validateRows(value) {
        this.controller.validateRows(value);
    }
    validateShortKey(value) {
        this.controller.validateShortKey(value);
    }
    validateSpellCheck(value) {
        this.controller.validateSpellCheck(value);
    }
    validateSyncValueBySelector(value) {
        this.controller.validateSyncValueBySelector(value);
    }
    validateTouched(value) {
        this.controller.validateTouched(value);
    }
    validateValue(value) {
        this.controller.validateValue(value);
    }
    validateVariant(value) {
        this.controller.validateVariant(value);
    }
    componentDidLoad() {
        setTimeout(() => {
            var _a;
            if (this._adjustHeight === true && this.ctaRef.el) {
                this._rows = ((_a = this.state) === null || _a === void 0 ? void 0 : _a._rows) && this.state._rows > increaseTextareaHeight(this.ctaRef.el) ? this.state._rows : increaseTextareaHeight(this.ctaRef.el);
            }
            else if (!this._rows) {
                this._rows = 1;
            }
        });
    }
    componentWillLoad() {
        this._touched = this._touched === true;
        this.controller.componentWillLoad();
        this.state._hasValue = !!this.state._value;
        this.controller.addValueChangeListener((v) => (this.state._hasValue = !!v));
    }
    get host() { return this; }
    static get watchers() { return {
        "_accessKey": ["validateAccessKey"],
        "_adjustHeight": ["validateAdjustHeight"],
        "_disabled": ["validateDisabled"],
        "_hideMsg": ["validateHideMsg"],
        "_hideLabel": ["validateHideLabel"],
        "_hasCounter": ["validateHasCounter"],
        "_hint": ["validateHint"],
        "_icons": ["validateIcons"],
        "_label": ["validateLabel"],
        "_maxLength": ["validateMaxLength"],
        "_maxLengthBehavior": ["validateMaxLengthBehavior"],
        "_msg": ["validateMsg"],
        "_name": ["validateName"],
        "_on": ["validateOn"],
        "_placeholder": ["validatePlaceholder"],
        "_readOnly": ["validateReadOnly"],
        "_resize": ["validateResize"],
        "_required": ["validateRequired"],
        "_rows": ["validateRows"],
        "_shortKey": ["validateShortKey"],
        "_spellCheck": ["validateSpellCheck"],
        "_syncValueBySelector": ["validateSyncValueBySelector"],
        "_touched": ["validateTouched"],
        "_value": ["validateValue"],
        "_variant": ["validateVariant"]
    }; }
    static get style() { return {
        default: defaultStyleCss
    }; }
}, [289, "kol-textarea", {
        "_accessKey": [1, "_access-key"],
        "_adjustHeight": [4, "_adjust-height"],
        "_disabled": [4],
        "_hideMsg": [4, "_hide-msg"],
        "_hideLabel": [4, "_hide-label"],
        "_hint": [1],
        "_icons": [1],
        "_label": [1],
        "_maxLength": [2, "_max-length"],
        "_hasCounter": [4, "_has-counter"],
        "_maxLengthBehavior": [1, "_max-length-behavior"],
        "_msg": [1],
        "_name": [1],
        "_on": [16],
        "_placeholder": [1],
        "_readOnly": [4, "_read-only"],
        "_resize": [1],
        "_required": [4],
        "_rows": [1026],
        "_shortKey": [1, "_short-key"],
        "_spellCheck": [4, "_spell-check"],
        "_syncValueBySelector": [1, "_sync-value-by-selector"],
        "_tooltipAlign": [1, "_tooltip-align"],
        "_touched": [1540],
        "_value": [1537],
        "_variant": [1],
        "state": [32],
        "inputHasFocus": [32],
        "getValue": [64],
        "focus": [64],
        "click": [64]
    }, undefined, {
        "_accessKey": ["validateAccessKey"],
        "_adjustHeight": ["validateAdjustHeight"],
        "_disabled": ["validateDisabled"],
        "_hideMsg": ["validateHideMsg"],
        "_hideLabel": ["validateHideLabel"],
        "_hasCounter": ["validateHasCounter"],
        "_hint": ["validateHint"],
        "_icons": ["validateIcons"],
        "_label": ["validateLabel"],
        "_maxLength": ["validateMaxLength"],
        "_maxLengthBehavior": ["validateMaxLengthBehavior"],
        "_msg": ["validateMsg"],
        "_name": ["validateName"],
        "_on": ["validateOn"],
        "_placeholder": ["validatePlaceholder"],
        "_readOnly": ["validateReadOnly"],
        "_resize": ["validateResize"],
        "_required": ["validateRequired"],
        "_rows": ["validateRows"],
        "_shortKey": ["validateShortKey"],
        "_spellCheck": ["validateSpellCheck"],
        "_syncValueBySelector": ["validateSyncValueBySelector"],
        "_touched": ["validateTouched"],
        "_value": ["validateValue"],
        "_variant": ["validateVariant"]
    }]);
__decorate([
    delegateFocus('ctaRef')
], KolTextarea$1.prototype, "focus", null);
__decorate([
    delegateClick('ctaRef')
], KolTextarea$1.prototype, "click", null);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["kol-textarea"];
    components.forEach(tagName => { switch (tagName) {
        case "kol-textarea":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, KolTextarea$1);
            }
            break;
    } });
}

const KolTextarea = KolTextarea$1;
const defineCustomElement = defineCustomElement$1;

export { KolTextarea, defineCustomElement };
//# sourceMappingURL=kol-textarea.js.map

//# sourceMappingURL=kol-textarea.js.map