import { h, Host } from "@stencil/core";
import { govForm } from "../../../helpers/Dom/form";
import { govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined } from "../../../helpers/Dom/template";
import { validateProp } from "../../../helpers/Validate/props";
import { createID } from "../../../utils/string.utils";
import { FormInputClass, FormInputSizes, } from "./constants";
import { AttributeObserver } from "../../../helpers/Dom/attribute";
import { ariaAttributes } from "../../../helpers/Accessibility/attributes";
import { inheritAriaAttributes } from "../../../helpers/Accessibility/accessibility";
var Tags;
(function (Tags) {
    Tags["INPUT"] = "input";
    Tags["TEXTAREA"] = "textarea";
})(Tags || (Tags = {}));
export class GovFormInput {
    constructor() {
        /**
         * Input’s size.
         */
        this.size = "m";
        /**
         * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.
         * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.
         */
        this.required = false;
        /**
         * Makes the input component disabled.
         */
        this.disabled = false;
        /**
         * Same as original parameter
         * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
         */
        this.inputType = "text";
        /**
         * Accessible text for password display
         */
        this.accessibleShowPasswordLabel = 'Zobrazit heslo';
        /**
         * Accessible text to hide the password
         */
        this.accessibleHidePasswordLabel = 'Skrýt heslo';
        this.showPassword = false;
        this.inheritedAttributes = {};
        this.h = govHost(this.host);
        this.inputId = createID("GovInput");
        this.f = govForm(this.h);
    }
    validateSize(newValue) {
        validateProp(FormInputSizes, newValue, FormInputClass.root);
    }
    watchControlAttrs() {
        this.passControlAttrs();
    }
    passControlAttrs() {
        this.f.passAttrToControl("size", this.size);
        this.f.passAttrToControl("success", toBoolAttr(this.success));
        this.f.passAttrToControl("disabled", toBoolAttr(this.disabled));
        this.f.passAttrToControl("invalid", toBoolAttr(this.invalid));
        this.f.passAttrToControl("type", this.multiline ? Tags.TEXTAREA : Tags.INPUT);
    }
    componentDidLoad() {
        this.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {
            this.onAriaAttributeChange(attributeName, newValue);
        });
        this.attributeObserver.startObserving(ariaAttributes);
        this.govHydrated.emit();
    }
    componentWillLoad() {
        this.validateSize(this.size);
        this.inheritedAttributes = inheritAriaAttributes(this.host);
    }
    componentDidRender() {
        this.passControlAttrs();
        this.f.passAttrToLabel("required", String(this.required));
    }
    onAriaAttributeChange(attributeName, newValue) {
        this.host.removeAttribute(attributeName);
        this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
    }
    disconnectedCallback() {
        var _a;
        (_a = this.attributeObserver) === null || _a === void 0 ? void 0 : _a.stopObserving();
    }
    render() {
        const Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT;
        return (h(Host, { key: '77dae47e06d063a2487a5ddbb1259306b5cdbfc3', class: FormInputClass.root, size: this.size, type: this.type }, this.h.hasSlot("prefix") && h("slot", { key: 'e8e2f433d1ef4132ea11deccd0430d1e629b939b', name: "prefix" }), h("span", { key: 'd6ccd3199c302f2bdefec80c9b1d41e221f5c996', class: "element" }, (this.h.hasSlot("icon-start") && !this.multiline) &&
            h("div", { key: '9bdfc91aeb6b5f9c9c16cf902d092caeb5c5d9c5', class: FormInputClass.icons, onClick: () => this.inputRef.focus() }, h("slot", { key: '2a2d7b03fbe85a18353ac360a822721b2e76da78', name: "icon-start" })), h(Tag, Object.assign({ key: 'e43d026dbb5138a6b69363805df462d18d3e1e1f', type: this.inputType === 'password' && this.showPassword ? 'text' : this.inputType, disabled: this.disabled, id: this.identifier || this.inputId, name: this.name, onFocus: this.onFocusHandler.bind(this), onInput: this.onInputHandler.bind(this), onBlur: this.onBlurHandler.bind(this), onKeyUp: this.onKeyUpHandler.bind(this), onKeyDown: this.onKeyDownHandler.bind(this), ref: el => (this.inputRef = el), placeholder: this.placeholder, spellcheck: toBoolAttrIfDefined(this.spellcheck), lang: this.inputLang, readonly: toBoolAttrIfDefined(this.readonly), autocomplete: toOnOffAttrIfDefined(this.autocomplete), autocorrect: toOnOffAttrIfDefined(this.autocorrect), minlength: this.minlength, maxlength: this.maxlength, min: this.min, max: this.max, required: this.required, rows: this.rows, cols: this.cols, role: this.role, value: this.value }, this.inheritedAttributes, { "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled) })), ((this.success || this.invalid || this.h.hasSlot("icon-end") || this.inputType === 'password') && !this.multiline) &&
            h("div", { key: '43025915f216c0153e069acdddbece0e059f3ec7', class: FormInputClass.icons, onClick: () => this.inputRef.focus() }, this.success && !this.multiline &&
                h("gov-icon", { key: '13b34f7a5e705afdb92877850f116895318bb876', class: "validation-icon", name: "check-lg", type: "components" }), this.invalid && !this.multiline &&
                h("gov-icon", { key: 'd671025577334714519c12956863a3a3c6f3af81', class: "validation-icon", name: "exclamation-lg", type: "components" }), this.h.hasSlot("icon-end") && this.inputType !== 'password' && h("slot", { key: 'f26ff9842ab606917ff1fe10e5fa83e0707f923f', name: "icon-end" }), this.inputType === 'password' ? (h("gov-button", { color: 'primary', type: 'base', size: this.size, "aria-label": this.showPassword ? this.accessibleHidePasswordLabel : this.accessibleShowPasswordLabel, "on-gov-click": () => this.showPassword = !this.showPassword }, h("gov-icon", { slot: "icon-start", name: "eye", type: "components" }))) : null)), this.h.hasSlot("sufix") && h("slot", { key: '666b152801bc34d6cdb66e88c22d695c4b4d169c', name: "sufix" })));
    }
    onFocusHandler(e) {
        e.stopPropagation();
        this.focused = true;
        this.govFocus.emit({
            component: FormInputClass.root,
            value: this.value,
            originalEvent: e,
        });
    }
    onBlurHandler(e) {
        e.stopPropagation();
        this.focused = false;
        this.govBlur.emit({
            component: FormInputClass.root,
            value: this.value,
            originalEvent: e,
        });
    }
    onKeyUpHandler(e) {
        e.stopPropagation();
        this.govKeyUp.emit({
            component: FormInputClass.root,
            value: this.value,
            originalEvent: e,
        });
    }
    onKeyDownHandler(e) {
        e.stopPropagation();
        this.govKeyDown.emit({
            component: FormInputClass.root,
            value: this.value,
            originalEvent: e,
        });
    }
    onInputHandler(e) {
        this.value = e.target.value;
        e.stopPropagation();
        this.govInput.emit({
            component: FormInputClass.root,
            value: this.value,
            originalEvent: e,
        });
    }
    /**
     * Returns the current state of the component
     */
    async setFocus(options) {
        return this.inputRef.focus(options);
    }
    /**
     * Sets the ordered value of the element
     */
    async setValue(value) {
        this.value = value;
    }
    /**
     * Clears input value
     */
    async clearValue() {
        this.value = "";
        this.inputRef.value = "";
    }
    /**
     * Returns an instance of the native html input element
     */
    async getRef() {
        return this.inputRef;
    }
    static get is() { return "gov-form-input"; }
    static get properties() {
        return {
            "value": {
                "type": "string",
                "attribute": "value",
                "mutable": true,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Value of input"
                },
                "getter": false,
                "setter": false,
                "reflect": true
            },
            "identifier": {
                "type": "string",
                "attribute": "identifier",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Custom input identifier."
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "success": {
                "type": "boolean",
                "attribute": "success",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Indicates the entered value of child form element does conform to the format expected by the application."
                },
                "getter": false,
                "setter": false,
                "reflect": true
            },
            "size": {
                "type": "string",
                "attribute": "size",
                "mutable": false,
                "complexType": {
                    "original": "FormInputSizesType",
                    "resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\"",
                    "references": {
                        "FormInputSizesType": {
                            "location": "import",
                            "path": "./constants",
                            "id": "../../../packages/core/src/components/gov-form/input/constants.ts::FormInputSizesType"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Input\u2019s size."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "\"m\""
            },
            "name": {
                "type": "string",
                "attribute": "name",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Name of the input."
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "multiline": {
                "type": "boolean",
                "attribute": "multiline",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Generates a texarea for the possibility of multiple lines"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "rows": {
                "type": "number",
                "attribute": "rows",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "cols": {
                "type": "number",
                "attribute": "cols",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "required": {
                "type": "boolean",
                "attribute": "required",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\r\nWhen using this property you need to also set \u201Cnovalidate\u201D attribute to your form element to prevent browser from displaying its own validation errors."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "defaultValue": "false"
            },
            "disabled": {
                "type": "boolean",
                "attribute": "disabled",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Makes the input component disabled."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "defaultValue": "false"
            },
            "placeholder": {
                "type": "string",
                "attribute": "placeholder",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Text that appears in the form control when it has no value set"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "readonly": {
                "type": "boolean",
                "attribute": "readonly",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The value is not editable"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "minlength": {
                "type": "number",
                "attribute": "minlength",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Minimum length (number of characters) of value"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "maxlength": {
                "type": "number",
                "attribute": "maxlength",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Maximum length (number of characters) of value"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "min": {
                "type": "any",
                "attribute": "min",
                "mutable": false,
                "complexType": {
                    "original": "string | number",
                    "resolved": "number | string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Minimum value that is acceptable and valid for the input containing the attribute"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "max": {
                "type": "any",
                "attribute": "max",
                "mutable": false,
                "complexType": {
                    "original": "string | number",
                    "resolved": "number | string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Maximum value that is acceptable and valid for the input containing the attribute"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "autocomplete": {
                "type": "boolean",
                "attribute": "autocomplete",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "autocorrect": {
                "type": "boolean",
                "attribute": "autocorrect",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "spellcheck": {
                "type": "boolean",
                "attribute": "spellcheck",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "inputLang": {
                "type": "string",
                "attribute": "input-lang",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "type": {
                "type": "string",
                "attribute": "type",
                "mutable": false,
                "complexType": {
                    "original": "Type",
                    "resolved": "Type",
                    "references": {
                        "Type": {
                            "location": "import",
                            "path": "./constants",
                            "id": "../../../packages/core/src/components/gov-form/input/constants.ts::Type"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Defined the visual style of input"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "inputType": {
                "type": "string",
                "attribute": "input-type",
                "mutable": false,
                "complexType": {
                    "original": "InputType",
                    "resolved": "\"color\" | \"date\" | \"datetime-local\" | \"email\" | \"month\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"time\" | \"url\" | \"week\"",
                    "references": {
                        "InputType": {
                            "location": "import",
                            "path": "./constants",
                            "id": "../../../packages/core/src/components/gov-form/input/constants.ts::InputType"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "link",
                            "text": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types"
                        }],
                    "text": "Same as original parameter"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "\"text\""
            },
            "role": {
                "type": "string",
                "attribute": "role",
                "mutable": false,
                "complexType": {
                    "original": "Nullable<string>",
                    "resolved": "string",
                    "references": {
                        "Nullable": {
                            "location": "import",
                            "path": "../../../types/interfaces",
                            "id": "../../../packages/core/src/types/interfaces.ts::Nullable"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "link",
                            "text": "https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role"
                        }],
                    "text": "Same as original parameter"
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "invalid": {
                "type": "boolean",
                "attribute": "invalid",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Indicates the entered value does not conform to the format expected by the application."
                },
                "getter": false,
                "setter": false,
                "reflect": true
            },
            "accessibleShowPasswordLabel": {
                "type": "string",
                "attribute": "accessible-show-password-label",
                "mutable": false,
                "complexType": {
                    "original": "\"Zobrazit heslo\"",
                    "resolved": "\"Zobrazit heslo\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Accessible text for password display"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "'Zobrazit heslo'"
            },
            "accessibleHidePasswordLabel": {
                "type": "string",
                "attribute": "accessible-hide-password-label",
                "mutable": false,
                "complexType": {
                    "original": "\"Skr\u00FDt heslo\"",
                    "resolved": "\"Skr\u00FDt heslo\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Accessible text to hide the password"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "'Skr\u00FDt heslo'"
            }
        };
    }
    static get states() {
        return {
            "focused": {},
            "showPassword": {},
            "inheritedAttributes": {}
        };
    }
    static get events() {
        return [{
                "method": "govFocus",
                "name": "gov-focus",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emitted when the input has focus."
                },
                "complexType": {
                    "original": "FormInputEvent",
                    "resolved": "FormInputEvent",
                    "references": {
                        "FormInputEvent": {
                            "location": "import",
                            "path": "./gov-form-input.types",
                            "id": "../../../packages/core/src/components/gov-form/input/gov-form-input.types.ts::FormInputEvent"
                        }
                    }
                }
            }, {
                "method": "govBlur",
                "name": "gov-blur",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emitted when the input loses focus."
                },
                "complexType": {
                    "original": "FormInputEvent",
                    "resolved": "FormInputEvent",
                    "references": {
                        "FormInputEvent": {
                            "location": "import",
                            "path": "./gov-form-input.types",
                            "id": "../../../packages/core/src/components/gov-form/input/gov-form-input.types.ts::FormInputEvent"
                        }
                    }
                }
            }, {
                "method": "govInput",
                "name": "gov-input",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emitted when the input change value."
                },
                "complexType": {
                    "original": "FormInputEvent",
                    "resolved": "FormInputEvent",
                    "references": {
                        "FormInputEvent": {
                            "location": "import",
                            "path": "./gov-form-input.types",
                            "id": "../../../packages/core/src/components/gov-form/input/gov-form-input.types.ts::FormInputEvent"
                        }
                    }
                }
            }, {
                "method": "govKeyUp",
                "name": "gov-keyup",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emitted when the input change value."
                },
                "complexType": {
                    "original": "FormInputEvent",
                    "resolved": "FormInputEvent",
                    "references": {
                        "FormInputEvent": {
                            "location": "import",
                            "path": "./gov-form-input.types",
                            "id": "../../../packages/core/src/components/gov-form/input/gov-form-input.types.ts::FormInputEvent"
                        }
                    }
                }
            }, {
                "method": "govHydrated",
                "name": "gov-hydrated",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emitted when the input change value."
                },
                "complexType": {
                    "original": "void",
                    "resolved": "void",
                    "references": {}
                }
            }, {
                "method": "govKeyDown",
                "name": "gov-keydown",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emitted when the input change value."
                },
                "complexType": {
                    "original": "FormInputEvent",
                    "resolved": "FormInputEvent",
                    "references": {
                        "FormInputEvent": {
                            "location": "import",
                            "path": "./gov-form-input.types",
                            "id": "../../../packages/core/src/components/gov-form/input/gov-form-input.types.ts::FormInputEvent"
                        }
                    }
                }
            }];
    }
    static get methods() {
        return {
            "setFocus": {
                "complexType": {
                    "signature": "(options?: FocusOptions) => Promise<void>",
                    "parameters": [{
                            "name": "options",
                            "type": "FocusOptions",
                            "docs": ""
                        }],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        },
                        "FocusOptions": {
                            "location": "global",
                            "id": "global::FocusOptions"
                        }
                    },
                    "return": "Promise<void>"
                },
                "docs": {
                    "text": "Returns the current state of the component",
                    "tags": []
                }
            },
            "setValue": {
                "complexType": {
                    "signature": "(value: string) => Promise<void>",
                    "parameters": [{
                            "name": "value",
                            "type": "string",
                            "docs": ""
                        }],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        }
                    },
                    "return": "Promise<void>"
                },
                "docs": {
                    "text": "Sets the ordered value of the element",
                    "tags": []
                }
            },
            "clearValue": {
                "complexType": {
                    "signature": "() => Promise<void>",
                    "parameters": [],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        }
                    },
                    "return": "Promise<void>"
                },
                "docs": {
                    "text": "Clears input value",
                    "tags": []
                }
            },
            "getRef": {
                "complexType": {
                    "signature": "() => Promise<HTMLInputElement>",
                    "parameters": [],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        },
                        "HTMLInputElement": {
                            "location": "global",
                            "id": "global::HTMLInputElement"
                        }
                    },
                    "return": "Promise<HTMLInputElement>"
                },
                "docs": {
                    "text": "Returns an instance of the native html input element",
                    "tags": []
                }
            }
        };
    }
    static get elementRef() { return "host"; }
    static get watchers() {
        return [{
                "propName": "size",
                "methodName": "validateSize"
            }, {
                "propName": "disabled",
                "methodName": "watchControlAttrs"
            }, {
                "propName": "invalid",
                "methodName": "watchControlAttrs"
            }, {
                "propName": "success",
                "methodName": "watchControlAttrs"
            }, {
                "propName": "size",
                "methodName": "watchControlAttrs"
            }];
    }
}
//# sourceMappingURL=gov-form-input.js.map
