/**
 * Auro-input provides users a way to enter data into a text field.
 *
 * @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
 * @attr id
 *
 * @slot ariaLabel.clear - Sets aria-label on clear button for screen reader to read
 * @slot ariaLabel.password.show - Sets aria-label on password button to toggle on showing password
 * @slot ariaLabel.password.hide - Sets aria-label on password button to toggle off showing password
 * @slot helpText - Sets the help text displayed below the input.
 * @slot label - Sets the label text for the input.
 * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
 * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
 *
 * @csspart wrapper - Use for customizing the style of the root element
 * @csspart label - Use for customizing the style of the label element
 * @csspart helpText - Use for customizing the style of the helpText element
 * @csspart input - Use for customizing the style of the input element
 * @csspart accentIcon - Use for customizing the style of the accentIcon element (e.g. credit card icon, calendar icon)
 * @csspart iconContainer - Use for customizing the style of the iconContainer (e.g. X icon for clearing input value)
 * @csspart accent-left - Use for customizing the style of the left accent element (e.g. padding, margin)
 * @csspart accent-right - Use for customizing the style of the right accent element (e.g. padding, margin)
 * @event input - Event fires when the value of an `auro-input` has been changed.
 * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
 */
export default class BaseInput extends AuroElement {
    static get properties(): {
        /**
         * If defined, the display value slot content will only mask the HTML5 input element. The input's label will not be masked.
         */
        dvInputOnly: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /**
         * The value for the role attribute.
         */
        a11yRole: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * The value for the aria-expanded attribute.
         */
        a11yExpanded: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /**
         * The value for the aria-controls attribute.
         */
        a11yControls: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * If set, the label will remain fixed in the active position.
         */
        activeLabel: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /**
         * Defines whether the component will be on lighter or darker backgrounds.
         * @property {'default', 'inverse'}
         * @default 'default'
         */
        appearance: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. [off/none, on/sentences, words, characters].
         */
        autocapitalize: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
         */
        autocomplete: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * When set to `off`, stops iOS from auto-correcting words when typed into a text box.
         */
        autocorrect: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * If set, disables the input.
         */
        disabled: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /**
         * When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
         */
        error: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * Contains the help text message for the current validity error.
         */
        errorMessage: {
            type: StringConstructor;
        };
        /**
         * Specifies the input mask format.
         */
        format: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * @private
         * Flag to indicate if the input currently has value.
         */
        hasValue: {
            type: BooleanConstructor;
            reflect: boolean;
            attribute: boolean;
        };
        /**
         * @private
         * Flag to indicate if the input currently has focus.
         */
        hasFocus: {
            type: BooleanConstructor;
            reflect: boolean;
            attribute: boolean;
        };
        /**
         * If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
         */
        icon: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /** Exposes inputmode attribute for input.  */
        inputmode: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * Defines the language of an element.
         */
        lang: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
         */
        max: {
            type: StringConstructor;
        };
        /**
         * The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
         */
        maxLength: {
            type: NumberConstructor;
            reflect: boolean;
        };
        /**
         * The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
         */
        min: {
            type: StringConstructor;
        };
        /**
         * The minimum number of characters the user can enter into the text input. This must be a non-negative integer value smaller than or equal to the value specified by `maxlength`.
         */
        minLength: {
            type: NumberConstructor;
            reflect: boolean;
        };
        /**
         * Populates the `name` attribute on the input.
         */
        name: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * Sets styles for nested operation - removes borders, hides help + error text, and
         * hides accents.
         */
        nested: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /**
         * If set, disables auto-validation on blur.
         */
        noValidate: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /**
         * DEPRECATED - use `appearance` instead.
         */
        onDark: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /**
         * Specifies a regular expression the form control's value should match.
         */
        pattern: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * Define custom placeholder text.
         */
        placeholder: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * Makes the input read-only, but can be set programmatically.
         */
        readonly: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /**
         * Populates the `required` attribute on the input. Used for client-side validation.
         */
        required: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /**
         * @ignore
         */
        showPassword: {
            state: boolean;
        };
        /**
         * Sets a custom help text message to display for all validityStates.
         */
        setCustomValidity: {
            type: StringConstructor;
        };
        /**
         * Custom help text message to display when validity = `badInput`.
         */
        setCustomValidityBadInput: {
            type: StringConstructor;
        };
        /**
         * Custom help text message to display when validity = `customError`.
         */
        setCustomValidityCustomError: {
            type: StringConstructor;
        };
        /**
         * Custom help text message to display for the declared element `type` and type validity fails.
         */
        setCustomValidityForType: {
            type: StringConstructor;
        };
        /**
         * Custom help text message to display when validity = `rangeOverflow`.
         */
        setCustomValidityRangeOverflow: {
            type: StringConstructor;
        };
        /**
         * Custom help text message to display when validity = `rangeUnderflow`.
         */
        setCustomValidityRangeUnderflow: {
            type: StringConstructor;
        };
        /**
         * Custom help text message to display when validity = `tooLong`.
         */
        setCustomValidityTooLong: {
            type: StringConstructor;
        };
        /**
         * Custom help text message to display when validity = `tooShort`.
         */
        setCustomValidityTooShort: {
            type: StringConstructor;
        };
        /**
         * Custom help text message to display when validity = `valueMissing`.
         */
        setCustomValidityValueMissing: {
            type: StringConstructor;
        };
        /**
         * Simple makes the input render without a border.
         */
        simple: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        /**
         * Custom help text message for email type validity.
         */
        customValidityTypeEmail: {
            type: StringConstructor;
        };
        /**
         * An enumerated attribute defines whether the element may be checked for spelling errors. [true, false]. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`.
         */
        spellcheck: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * Populates the `type` attribute on the input. Allowed values are `password`, `email`, `credit-card`, `date`, `tel` or `text`. If given value is not allowed or set, defaults to `text`.
         */
        type: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
         */
        value: {
            type: StringConstructor;
        };
        /**
         * Sets validation mode to re-eval with each input.
         */
        validateOnInput: {
            type: BooleanConstructor;
        };
        /**
         * Specifies the `validityState` this element is in.
         */
        validity: {
            type: StringConstructor;
            reflect: boolean;
        };
        /**
         * Indicates whether the input is in a dirty state (has been interacted with).
         * @type {boolean}
         * @default false
         * @private
         */
        touched: boolean;
        /**
         * The id for input node.
         * @private
         */
        inputId: {
            type: StringConstructor;
            reflect: boolean;
            attribute: boolean;
        };
        layout: {
            type: StringConstructor;
            attribute: string;
            reflect: boolean;
        };
    };
    activeLabel: boolean;
    appearance: string;
    icon: boolean;
    disabled: boolean;
    dvInputOnly: boolean;
    max: any;
    maxLength: any;
    min: any;
    minLength: any;
    noValidate: boolean;
    onDark: boolean;
    required: boolean;
    setCustomValidityForType: string;
    /**
     * @private
     */
    private shape;
    /**
     * @private
     */
    private size;
    /**
     * Internal Defaults.
     * @private
     * @returns {void}
     */
    private privateDefaults;
    touched: boolean;
    util: AuroInputUtilities;
    validation: AuroFormValidation;
    inputIconName: any;
    showPassword: any;
    validationCCLength: number;
    hasValue: boolean;
    label: string;
    allowedInputTypes: string[];
    /**
     * Credit Card is not included as this caused cursor placement issues.
     * The Safari issue.
     */
    setSelectionInputTypes: string[];
    dateFormatMap: {
        'mm/dd/yyyy': string;
        'dd/mm/yyyy': string;
        'yyyy/mm/dd': string;
        'yyyy/dd/mm': string;
        'mm/yy': string;
        'yy/mm': string;
        'mm/yyyy': string;
        'yyyy/mm': string;
        yy: string;
        yyyy: string;
        mm: string;
        dd: string;
        'dd/mm': string;
        'mm/dd': string;
    };
    uniqueId: string;
    firstUpdated(): void;
    wrapperElement: Element;
    inputElement: HTMLInputElement;
    labelElement: HTMLLabelElement;
    inputId: string;
    format: any;
    ValidityMessageOverride: any;
    /**
     * Patches the input element to dispatch an 'input' event whenever its value is set programmatically.
     * This ensures that changes to the input's value are consistently communicated, even if not triggered by user input.
     *
     * @param {HTMLInputElement} input - The input element to patch.
     * @returns {void}
     * @private
     */
    private patchInputEvent;
    /**
     * @private
     * @returns {void} Sets the default help text for the input.
     */
    private setCustomHelpTextMessage;
    /**
     * LitElement lifecycle method. Called after the DOM has been updated.
     * @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.
     * @returns {void}
     */
    updated(changedProperties: Map<string, any>): void;
    skipNextProgrammaticInputEvent: boolean;
    /**
     * @private
     * @returns {void} Notify validity state changed via event.
     */
    private notifyValidityChange;
    /**
     * Sets up IMasks and logic based on auto-formatting requirements.
     * @private
     * @returns {void}
     */
    private configureAutoFormatting;
    maskInstance: import("imask").InputMask<import("imask").FactoryArg>;
    value: string;
    formattedDate: any;
    comparisonDate: any;
    /**
     * @private
     * @returns {string}
     */
    private definePattern;
    /**
     * Required to convert SVG icons from data to HTML string.
     * @private
     * @param {string} icon HTML string for requested icon.
     * @returns {object} Appended HTML for SVG.
     */
    private getIconAsHtml;
    /**
     * Sends event notifying that the input has changed it's value.
     * @private
     * @returns {void}
     */
    private notifyValueChanged;
    /**
     * Handles clicking on the auro-input anywhere outside of the HTML5 input and still moving focus in.
     * @private
     * @return {void}
     */
    private handleClick;
    /**
     * Function to set element focus.
     * @return {void}
     */
    focus(): void;
    /**
     * Handles event of clearing input content by clicking the X icon.
     * @private
     * @return {void}
     */
    private handleClickClear;
    /**
     * @param {Event} event - The input event
     * @private
     * @returns {void}
     */
    private handleInput;
    /**
     * Function to support @focusin event.
     * @private
     * @return {void}
     */
    private handleFocusin;
    hasFocus: boolean;
    /**
     * Function to support @focusout event.
     * @private
     * @return {void}
     */
    private handleFocusout;
    /**
     * Function to support @blur event.
     * @private
     * @return {void}
     */
    private handleBlur;
    /**
     * Returns focused element, even if it's in the shadow DOM.
     * @private
     * @param {Object} root - Element to check for focus.
     * @returns {Object}
     */
    private getActiveElement;
    /**
     * Validates value.
     * @param {boolean} [force=false] - Whether to force validation.
     */
    validate(force?: boolean): void;
    /**
     * Resets component to initial state, including resetting the touched state and validity.
     * @returns {void}
     */
    reset(): void;
    /**
     * Clears the input value.
     */
    clear(): void;
    /**
     * Sets configuration data used elsewhere based on the `type` attribute.
     * @private
     * @returns {void}
     */
    private configureDataForType;
    lengthForType: any;
    inputmode: any;
    /**
     * Validates against list of supported this.allowedInputTypes; return type=text if invalid request.
     * @private
     * @param {string} type Value entered into component prop.
     * @returns {string} Iterates over allowed types array.
     */
    private getInputType;
    /**
     * Determines default help text string.
     * @private
     * @returns {string} Evaluates pre-determined help text.
     */
    private getHelpText;
    /**
     * Function to support show-password feature.
     * @private
     * @returns {void}
     */
    private handleClickShowPassword;
    /**
     * Support placeholder text.
     * @private
     * @returns {void}
     */
    private get placeholderStr();
    /**
     * Defines placement of input icon based on type, used with classMap.
     * @private
     * @returns {boolean}
     */
    private defineInputIcon;
    /**
     * Defines padding of input label based on type, used with classMap.
     * @private
     * @returns {boolean}
     */
    private defineLabelPadding;
    /**
     * Function to support credit-card feature type.
     * @private
     * @returns {void}
     */
    private processCreditCard;
    errorMessage: any;
    /**
     * Function to support credit-card feature type.
     * @private
     * @returns {object} JSON with data for credit card formatting.
     */
    private matchInputValueToCreditCard;
}
import { AuroElement } from '../../layoutElement/src/auroElement.js';
import { AuroInputUtilities } from "./utilities.js";
import AuroFormValidation from '@auro-formkit/form-validation';
