import { __decorate } from "tslib";
import { html, nothing } from "lit";
import { property, query, queryAssignedElements, state } from "lit/decorators.js";
import { classMap } from "lit/directives/class-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { isDisabled, setDisabled } from "../lib/disabled.js";
import { UiElement } from "../UiElement.js";
import '../../define/ui/ui-icon-button.js';
import '../../define/ui/ui-icon.js';
// export type SupportedInputTypes = "text" | "search" | "tel" | "url" | "email" | "password" | 
//   "datetime" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "color" | "file";
const floatTypes = [
    'date',
    'color',
    'datetime-local',
    'file',
    'month',
    'time',
    'week',
];
/**
 * @slot prefix - A slot in which to render prefixes of the input
 * @slot suffix - A slot in which to render suffixes of the input
 */
export default class Input extends UiElement {
    #_userInteracted;
    // static override shadowRootOptions: ShadowRootInit = {mode: 'open', delegatesFocus: true};
    static get formAssociated() {
        return true;
    }
    #_internals;
    get form() {
        return this.#_internals && this.#_internals.form;
    }
    /**
     * Disables the input.
     * @attribute
     */
    get disabled() {
        return isDisabled(this);
    }
    set disabled(value) {
        const old = isDisabled(this);
        setDisabled(this, value);
        this.requestUpdate('disabled', old);
        this._updateFormValue();
        if (value) {
            this.dataset.tabindex = this.getAttribute('tabindex') || '0';
            this.removeAttribute('tabindex');
        }
        else {
            const index = this.dataset.tabindex || '0';
            this.setAttribute('tabindex', index);
            this.blur();
        }
    }
    #_required;
    /**
     * Set to true to mark the input element as required.
     * @attribute
     */
    get required() {
        return this.#_required;
    }
    set required(value) {
        const old = this.#_required;
        if (old === value) {
            return;
        }
        this.#_required = value;
        this.requestUpdate('required', 'old');
        this._updateFormValue();
    }
    setNativeValue(key, value) {
        const { input } = this;
        if (input) {
            // eslint-disable-next-line @typescript-eslint/no-explicit-any
            input[key] = value;
        }
        else {
            this.pendingSetters.set(key, value);
        }
    }
    getNativeValue(key) {
        const { input } = this;
        if (input) {
            return input[key];
        }
        return this.pendingSetters.get(key) || null;
    }
    /**
     * Gets or sets the direction in which selection occurred.
     */
    get selectionDirection() {
        return this.getNativeValue('selectionDirection');
    }
    set selectionDirection(value) {
        this.setNativeValue('selectionDirection', value);
    }
    /**
     * Gets or sets the end position or offset of a text selection.
     */
    get selectionEnd() {
        return this.getNativeValue('selectionEnd');
    }
    set selectionEnd(value) {
        this.setNativeValue('selectionEnd', value);
    }
    /**
     * Gets or sets the starting position or offset of a text selection.
     */
    get selectionStart() {
        return this.getNativeValue('selectionStart');
    }
    set selectionStart(value) {
        this.setNativeValue('selectionStart', value);
    }
    /**
     * Returns the native validation error message that would be displayed upon
     * calling `reportValidity()`.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validationMessage
     */
    get validationMessage() {
        return this.getNativeValue('validationMessage') ?? '';
    }
    /**
     * Returns a ValidityState object that represents the validity states of the
     * text field.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validity
     */
    get validity() {
        return this.getNativeValue('validity') ?? this.#_internals.validity;
    }
    /**
     * The text field's value as a number.
     */
    get valueAsNumber() {
        return this.getNativeValue('valueAsNumber') ?? 0;
    }
    set valueAsNumber(value) {
        this.setNativeValue('valueAsNumber', value);
    }
    /**
     * The text field's value as a Date.
     */
    get valueAsDate() {
        return this.getNativeValue('valueAsDate');
    }
    set valueAsDate(value) {
        this.setNativeValue('valueAsDate', value);
    }
    /**
     * Returns whether an element will successfully validate based on forms
     * validation rules and constraints.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/willValidate
     */
    get willValidate() {
        return this.getNativeValue('willValidate') ?? false;
    }
    /**
     * When set is shows password in the `password` input.
     * This is private so the password can be viewed only through user interaction.
     */
    #showPassword;
    get files() {
        return this.getNativeValue('files');
    }
    constructor() {
        super();
        this.#_internals = this.attachInternals();
        /**
         * When a form is submitted, only checkboxes which are currently checked are submitted to the server,
         * and the reported value is the `value` of the value attribute.
         * If the `value` is not otherwise specified, it is the string `on` by default.
         * @attribute
         */
        this.value = '';
        /**
         * The error message that replaces supporting text when `error` is true. If
         * `errorText` is an empty string, then the supporting text will continue to
         * show.
         *
         * Calling `reportValidity()` will automatically update `errorText` to the
         * native `validationMessage`.
         * @attribute
         */
        this.invalidText = '';
        /**
         * Whether or not the text field has a leading icon. Used for SSR.
         * @attribute
         */
        this.hasPrefix = false;
        /**
         * Whether or not the text field has a trailing icon. Used for SSR.
         * @attribute
         */
        this.hasSuffix = false;
        /**
         * Conveys additional information below the text field, such as how it should
         * be used.
         * @attribute
         */
        this.supportingText = '';
        /**
         * Override the input text CSS `direction`. Useful for RTL languages that use
         * LTR notation for fractions.
         * @attribute
         */
        this.textDirection = '';
        /**
         * Defines the greatest value in the range of permitted values.
         *
         * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max
         * @attribute
         */
        this.max = '';
        /**
         * The maximum number of characters a user can enter into the text field. Set
         * to -1 for none.
         *
         * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
         * @attribute
         */
        this.maxLength = -1;
        /**
         * Defines the most negative value in the range of permitted values.
         *
         * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min
         * @attribute
         */
        this.min = '';
        /**
         * The minimum number of characters a user can enter into the text field. Set
         * to -1 for none.
         *
         * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
         * @attribute
         */
        this.minLength = -1;
        /**
         * A regular expression that the text field's value must match to pass
         * constraint validation.
         *
         * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern
         * @attribute
         */
        this.pattern = '';
        /**
         * @attribute
         */
        this.placeholder = '';
        /**
         * Indicates whether or not a user should be able to edit the text field's
         * value.
         *
         * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#readonly
         *
         * @attribute
         */
        this.readOnly = false;
        /**
         * Bind the `<input>`'s `autocomplete` property.
         * @default off
         * @attribute
         */
        this.autocomplete = 'off';
        /**
         * Binds this to the `<input>`'s `inputMode` property.
         * @attribute
         */
        this.inputMode = '';
        /**
         * Binds this to the `<input>`'s `autocapitalize` property.
         *
         * Possible values are:
         *
         * - `off` or `none`: No autocapitalization is applied (all letters default to lowercase)
         * - `on` or `sentences`: The first letter of each sentence defaults to a capital letter;
         *  all other letters default to lowercase
         * - `words`: The first letter of each word defaults to a capital letter; all other letters default to lowercase
         * - `characters`: All letters should default to uppercase
         *
         * @default off
         * @attr
         */
        this.autocapitalize = 'off';
        /**
         * Binds this to the `<input>`'s `autocorrect` property.
         * @default off
         * @attribute
         */
        this.autocorrect = 'off';
        this.pendingSetters = new Map();
        /**
         * Returns or sets the element's step attribute, which works with min and max
         * to limit the increments at which a numeric or date-time value can be set.
         *
         * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
         * @attribute
         */
        this.step = '';
        /**
         * Returns true when the text field has been interacted with. Native
         * validation errors only display in response to user interactions.
         */
        this.dirty = false;
        this.focused = false;
        /**
         * The validation message displayed from a native error via
         * `reportValidity()`.
         */
        this.nativeErrorText = '';
        /**
         * Whether or not a native error has been reported via `reportValidity()`.
         */
        this.nativeError = false;
        this.counterId = 'counter';
        this.supportingTextId = 'support';
        this.labelId = 'support';
        this.ariaAutoComplete = null;
        this.ariaControls = null;
        this.ariaActiveDescendant = null;
        this.ariaExpanded = null;
        this.dataRole = null;
        /**
         * When set to true, the error text's `role="alert"` will be removed, then
         * re-added after an animation frame. This will re-announce an error message
         * to screen readers.
         */
        this.refreshErrorAlert = false;
        /**
         * When set is shows password in the `password` input.
         * This is private so the password can be viewed only through user interaction.
         */
        this.#showPassword = false;
        this.removingTabindex = false;
        this.type = 'text';
        this.#_userInteracted = false;
        this.actionController.cancelKeyboardEvents = false;
        this.addEventListener('click', this.handleClick.bind(this));
        this.addEventListener('focus', this.handleFocus.bind(this));
        this.addEventListener('blur', this.handleBlur.bind(this));
    }
    connectedCallback() {
        super.connectedCallback();
        if (!this.hasAttribute('tabindex') && !this.disabled) {
            this.setAttribute('tabindex', '0');
        }
        this.handleSlotChange();
    }
    /**
     * When form-associated custom elements are supported in the browser it
     * is called when the form has been reset
     */
    formResetCallback() {
        this.value = '';
    }
    /**
     * When form-associated custom elements are supported in the browser it
     * is called when the form state has been restored
     *
     * @param formState Restored value
     */
    formStateRestoreCallback(formState) {
        this.value = formState ?? '';
    }
    updated(changedProperties) {
        super.updated(changedProperties);
        if (changedProperties.has('value')) {
            this._updateFormValue();
        }
        if (this.refreshErrorAlert) {
            // The past render cycle removed the role="alert" from the error message.
            // Re-add it after an animation frame to re-announce the error.
            requestAnimationFrame(() => {
                this.refreshErrorAlert = false;
            });
        }
    }
    _updateFormValue() {
        const { value = '', disabled } = this;
        if (!value || disabled) {
            this.#_internals.setFormValue(null);
        }
        else {
            this.#_internals.setFormValue(value);
        }
        this._updateValidationState();
    }
    _updateValidationState() {
        const { input } = this;
        if (!input) {
            return;
        }
        const { validationMessage, validity } = input;
        if (!validity.valid) {
            this.#_internals.setValidity({
                valueMissing: validity.valueMissing,
                badInput: validity.badInput,
                patternMismatch: validity.patternMismatch,
                rangeOverflow: validity.rangeOverflow,
                rangeUnderflow: validity.rangeUnderflow,
                stepMismatch: validity.stepMismatch,
                tooLong: validity.tooLong,
                tooShort: validity.tooShort,
                typeMismatch: validity.typeMismatch,
                customError: validity.customError,
            }, validationMessage);
            return;
        }
        this.#_internals.setValidity({});
    }
    invalidHandler(e) {
        this.retargetEvent(e);
        if (!this.#_userInteracted) {
            return;
        }
        this.invalid = true;
    }
    handleSlotChange() {
        this.hasPrefix = this.prefixes.length > 0;
        this.hasSuffix = this.suffixes.length > 0;
    }
    getInputValue() {
        return this.value || '';
    }
    /**
     * Checks the text field's native validation and returns whether or not the
     * element is valid.
     *
     * If invalid, this method will dispatch the `invalid` event.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity
     *
     * @return true if the text field is valid, or false if not.
     */
    checkValidity() {
        this.#_userInteracted = true;
        const { valid } = this.checkValidityAndDispatch();
        this.invalid = !valid;
        return valid;
    }
    /**
     * Focuses the text field's input text.
     */
    focus() {
        if (this.disabled || this.matches(':focus-within')) {
            return;
        }
        this.input?.focus();
    }
    /**
     * Unfocuses the text field.
     */
    blur() {
        this.input?.blur();
    }
    /**
     * Checks the text field's native validation and returns whether or not the
     * element is valid.
     *
     * If invalid, this method will dispatch the `invalid` event.
     *
     * This method will display or clear an error text message equal to the text
     * field's `validationMessage`, unless the invalid event is canceled.
     *
     * Use `setCustomValidity()` to customize the `validationMessage`.
     *
     * This method can also be used to re-announce error messages to screen
     * readers.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/reportValidity
     *
     * @return true if the text field is valid, or false if not.
     */
    reportValidity() {
        this.#_userInteracted = true;
        const { valid, canceled } = this.checkValidityAndDispatch();
        this._updateValidationState();
        if (!canceled) {
            this.invalid = !valid;
            const prevMessage = this.getErrorText();
            this.nativeError = !valid;
            this.nativeErrorText = this.validationMessage;
            const needsRefresh = this.shouldErrorAnnounce() && prevMessage === this.getErrorText();
            if (needsRefresh) {
                this.refreshErrorAlert = true;
            }
        }
        return valid;
    }
    shouldErrorAnnounce() {
        // Announce if there is an error and error text visible.
        // If refreshErrorAlert is true, do not announce. This will remove the
        // role="alert" attribute. Another render cycle will happen after an
        // animation frame to re-add the role.
        return this.getError() && !!this.getErrorText() && !this.refreshErrorAlert;
    }
    getErrorText() {
        return this.invalid ? this.invalidText : this.nativeErrorText;
    }
    /**
     * Selects all the text in the text field.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select
     */
    select() {
        this.input?.select();
    }
    /**
     * Sets the text field's native validation error message. This is used to
     * customize `validationMessage`.
     *
     * When the error is not an empty string, the text field is considered invalid
     * and `validity.customError` will be true.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setCustomValidity
     *
     * @param error The error message to display.
     */
    setCustomValidity(error) {
        this.input?.setCustomValidity(error);
    }
    setRangeText(...args) {
        const { input } = this;
        if (!input) {
            return;
        }
        // Calling setRangeText with 1 vs 3-4 arguments has different behavior.
        // Use spread syntax and type casting to ensure correct usage.
        input.setRangeText(...args);
        this.value = input.value;
    }
    /**
     * Sets the start and end positions of a selection in the text field.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
     *
     * @param start The offset into the text field for the start of the selection.
     * @param end The offset into the text field for the end of the selection.
     * @param direction The direction in which the selection is performed.
     */
    setSelectionRange(start, end, direction) {
        this.input?.setSelectionRange(start, end, direction);
    }
    /**
     * Decrements the value of a numeric type text field by `step` or `n` `step`
     * number of times.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepDown
     *
     * @param stepDecrement The number of steps to decrement, defaults to 1.
     */
    stepDown(stepDecrement) {
        const { input } = this;
        if (!input) {
            return;
        }
        input.stepDown(stepDecrement);
        this.value = input.value;
    }
    /**
     * Increments the value of a numeric type text field by `step` or `n` `step`
     * number of times.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepUp
     *
     * @param stepIncrement The number of steps to increment, defaults to 1.
     */
    stepUp(stepIncrement) {
        const { input } = this;
        if (!input) {
            return;
        }
        input.stepUp(stepIncrement);
        this.value = input.value;
    }
    /**
     * Reset the text field to its default value.
     */
    reset() {
        this.dirty = false;
        this.value = '';
    }
    handleClick() {
        this.focus();
    }
    handleFocus() {
        const { input } = this;
        if (this.disabled || !input) {
            return;
        }
        this.focused = true;
        this.#_userInteracted = true;
        this.removingTabindex = true;
        // Note, the input is automatically focused when form is being submitted and
        // it won't pass validation. In this case the form will throw an error 
        // as the input is not focusable. In overall, this still works with forms and validation.
        this.dataset.tabindex = this.getAttribute('tabindex') || '0';
        this.removeAttribute('tabindex');
        input.focus();
        setTimeout(() => {
            this.removingTabindex = false;
        }, 1);
    }
    handleBlur() {
        if (this.matches(':focus-within') || this.removingTabindex) {
            // Changing focus to another child within the text field, like a button
            return;
        }
        this.focused = false;
        const index = this.dataset.tabindex || '0';
        delete this.dataset.tabindex;
        this.setAttribute('tabindex', index);
    }
    checkValidityAndDispatch() {
        const { input } = this;
        const valid = input?.checkValidity() ?? true;
        let canceled = false;
        if (!valid) {
            canceled = !this.dispatchEvent(new Event('invalid', { cancelable: true }));
        }
        return { valid, canceled };
    }
    /**
     * @returns `true` when the label is in resting state.
     */
    labelResting() {
        const { value } = this;
        if (!!value || String(value) === '0') {
            return false;
        }
        if (floatTypes.includes(this.type || '')) {
            return false;
        }
        return !this.placeholder && !this.focused;
    }
    /**
     * @returns `true` when the label should be hidden
     */
    labelHidden() {
        const { noFloating } = this;
        return !this.labelResting() && !!noFloating;
    }
    renderLabelText() {
        const labelText = this.label ?? '';
        const optionalAsterisk = this.required && labelText ? '*' : '';
        return labelText + optionalAsterisk;
    }
    getSupportingText() {
        const errorText = this.getErrorText();
        return this.getError() && errorText ? errorText : this.supportingText;
    }
    getError() {
        return this.invalid || this.nativeError;
    }
    retargetEvent(event) {
        if (event.bubbles && (!this.shadowRoot || event.composed)) {
            event.stopPropagation();
        }
        const copy = Reflect.construct(event.constructor, [event.type, event]);
        const dispatched = this.dispatchEvent(copy);
        if (!dispatched) {
            event.preventDefault();
        }
        return dispatched;
    }
    handleInput(event) {
        this.dirty = true;
        this.value = event.target.value;
        this.retargetEvent(event);
        this.reportValidity();
    }
    hasCounter() {
        return this.maxLength > -1;
    }
    getCounterText() {
        const { length } = (this.value || '');
        return `${length} / ${this.maxLength || 0}`;
    }
    getAriaDescribedBy() {
        const hasSupport = !!this.getSupportingText();
        const hasCounter = this.hasCounter();
        if (hasSupport) {
            return this.supportingTextId;
        }
        if (hasCounter) {
            return this.counterId;
        }
        return '';
    }
    #handlePasswordToggle() {
        this.#showPassword = !this.#showPassword;
        this.requestUpdate();
    }
    get effectiveType() {
        const { type } = this;
        if (type !== 'password') {
            return type;
        }
        const visible = this.#showPassword;
        return visible ? 'text' : 'password';
    }
    render() {
        const { pressed = false } = this;
        const containerClasses = classMap({
            surface: true,
            pressed,
            labelResting: this.labelResting(),
            labelHidden: this.labelHidden(),
        });
        return html `
    <div class="${containerClasses}">
      <div class="container"></div>
      <div class="content">
        ${this.renderPrefix()}
        ${this.renderBody()}
        ${this.renderPasswordControl()}
        ${this.renderSuffix()}
        ${this.renderHighlight()}
      </div>
    </div>
    ${this.renderSupportingText()}
    ${this.renderDataList()}
    `;
    }
    renderPrefix() {
        const classes = classMap({
            start: true,
            prefixed: this.hasPrefix,
        });
        return html `
    <div class="${classes}">
      <slot name="prefix" @slotchange=${this.handleSlotChange}></slot>
    </div>`;
    }
    renderSuffix() {
        const classes = classMap({
            end: true,
            suffixed: this.hasSuffix,
        });
        return html `
    <div class="${classes}">
      <slot name="suffix" @slotchange=${this.handleSlotChange}></slot>
    </div>`;
    }
    renderBody() {
        return html `
    <div class="body">
      ${this.renderLabel()}
      ${this.renderInput()}
    </div>
    `;
    }
    renderLabel() {
        const label = this.renderLabelText();
        if (!label) {
            return html ``;
        }
        return html `
    <span class="label" id="${this.labelId}" title="label">${label}</span>
    `;
    }
    renderHighlight() {
        return html `
    <span class="highlight"></span>
    `;
    }
    renderSupportingText() {
        return html `
      <span class="supporting-text">
        ${this.renderSupportingTextValue()}
        ${this.renderCounter()}
      </span>
    `;
    }
    renderSupportingTextValue() {
        const text = this.getSupportingText();
        if (!text) {
            return html ``;
        }
        const shouldAlert = this.shouldErrorAnnounce();
        return html `
    <span 
      class="supporting-text-start" 
      id="${this.supportingTextId}" 
      role=${ifDefined(shouldAlert ? 'alert' : undefined)}
    >
      ${text}
    </span>
    `;
    }
    renderCounter() {
        if (!this.hasCounter()) {
            return html ``;
        }
        // TODO: add aria-label and announcements
        return html `<span id=${this.counterId} class="supporting-text-end">${this.getCounterText()}</span>`;
    }
    renderPasswordControl() {
        const { type } = this;
        if (type !== 'password') {
            return nothing;
        }
        const visible = this.#showPassword;
        const icon = visible ? 'visibilityOff' : 'visibility';
        return html `
    <ui-icon-button 
      aria-label="Toggle password visibility" 
      @click="${this.#handlePasswordToggle}"
      title="Shows or hides the password"
    >
      <ui-icon icon="${icon}"></ui-icon>
    </ui-icon-button>
    `;
    }
    renderDataList() {
        const { list } = this;
        if (!Array.isArray(list) || !list.length) {
            return nothing;
        }
        return html `
    <datalist id="input-list">
    ${list.map(i => html `<option value="${i}">`)}
    </datalist>
    `;
    }
}
__decorate([
    property({ type: String, reflect: true })
], Input.prototype, "type", void 0);
__decorate([
    property({ reflect: true, type: Boolean })
], Input.prototype, "disabled", null);
__decorate([
    property({ type: String })
], Input.prototype, "name", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "value", void 0);
__decorate([
    property({ reflect: true, type: Boolean })
], Input.prototype, "required", null);
__decorate([
    property({ type: Boolean, reflect: true })
], Input.prototype, "invalid", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "invalidText", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "label", void 0);
__decorate([
    property({ type: Boolean })
], Input.prototype, "hasPrefix", void 0);
__decorate([
    property({ type: Boolean })
], Input.prototype, "hasSuffix", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "supportingText", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "textDirection", void 0);
__decorate([
    property({ type: Boolean })
], Input.prototype, "noFloating", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "max", void 0);
__decorate([
    property({ type: Number })
], Input.prototype, "maxLength", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "min", void 0);
__decorate([
    property({ type: Number })
], Input.prototype, "minLength", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "pattern", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "placeholder", void 0);
__decorate([
    property({ type: Boolean, reflect: true })
], Input.prototype, "readOnly", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "autocomplete", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "inputMode", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "autocorrect", void 0);
__decorate([
    property({ type: Number })
], Input.prototype, "results", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "accept", void 0);
__decorate([
    property({ type: Boolean })
], Input.prototype, "multiple", void 0);
__decorate([
    property({ type: Number })
], Input.prototype, "size", void 0);
__decorate([
    property({ type: String })
], Input.prototype, "step", void 0);
__decorate([
    state()
], Input.prototype, "dirty", void 0);
__decorate([
    state()
], Input.prototype, "focused", void 0);
__decorate([
    query('.input')
], Input.prototype, "input", void 0);
__decorate([
    queryAssignedElements({ slot: 'prefix' })
], Input.prototype, "prefixes", void 0);
__decorate([
    queryAssignedElements({ slot: 'suffix' })
], Input.prototype, "suffixes", void 0);
__decorate([
    state()
], Input.prototype, "nativeErrorText", void 0);
__decorate([
    state()
], Input.prototype, "nativeError", void 0);
__decorate([
    property({ type: String, attribute: 'data-aria-autocomplete', noAccessor: true })
], Input.prototype, "ariaAutoComplete", void 0);
__decorate([
    property({ type: String, attribute: 'data-aria-controls', noAccessor: true })
], Input.prototype, "ariaControls", void 0);
__decorate([
    property({ type: String, attribute: 'data-aria-activedescendant', noAccessor: true })
], Input.prototype, "ariaActiveDescendant", void 0);
__decorate([
    property({ type: String, attribute: 'data-aria-expanded', noAccessor: true })
], Input.prototype, "ariaExpanded", void 0);
__decorate([
    property({ type: String, attribute: 'data-aria-label', noAccessor: true })
], Input.prototype, "ariaLabel", void 0);
__decorate([
    property({ type: String, attribute: 'data-aria-labelledby', noAccessor: true })
], Input.prototype, "ariaLabelledBy", void 0);
__decorate([
    property({ type: String, attribute: 'data-role', noAccessor: true })
], Input.prototype, "dataRole", void 0);
__decorate([
    state()
], Input.prototype, "refreshErrorAlert", void 0);
__decorate([
    property({ type: Array })
], Input.prototype, "list", void 0);
//# sourceMappingURL=Input.js.map