import { AXEvent, MXValueComponent, MXLookComponent, AXComponent, AXValuableComponent, AXFocusableComponent } from '@acorex/cdk/common';
import { NgStyle } from '@angular/common';
import * as i0 from '@angular/core';
import { input, model, output, computed, afterNextRender, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
import * as i1 from '@angular/forms';
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
import { classes } from 'polytype';

class AXOtpCompletedEvent extends AXEvent {
}

/**
 * @category
 * A component for OTP input fields with state management and custom styling support.
 */
class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
    /** @ignore */
    constructor() {
        super();
        this.type = input('number', ...(ngDevMode ? [{ debugName: "type" }] : []));
        /**
         * Holds the length of the OTP input field.
         */
        this.length = model(...(ngDevMode ? [undefined, { debugName: "length" }] : []));
        /**
         * @event
         * Emits an event when the OTP input is completed.
         */
        this.onCompleted = output();
        /**
         * Stores the values entered in the OTP input fields.
         */
        this.inputValues = [];
        /**
         * Holds the input values as a signal.
         */
        this.inputs = computed(() => {
            this.calcFontSize();
            //
            return Array(this.length())
                .fill(1)
                .map((x, i) => i);
        }, ...(ngDevMode ? [{ debugName: "inputs" }] : []));
        afterNextRender(() => {
            this.calcFontSize();
            this.mapValueToInputs();
        });
    }
    /**
     * Converts the value string to input values and updates the inputValues array.
     */
    mapValueToInputs() {
        this._emitOnComplete();
        if (!this.value) {
            return;
        }
        this.value.split('').map((v, i) => {
            this.inputValues[i] = v;
        });
    }
    /**
     * Resets the input values to an empty array.
     */
    reset() {
        this.inputValues = [];
        for (let index = 0; index < this.length(); index++) {
            this.inputValues.push(' ');
        }
    }
    /** @ignore */
    _handleOnInput(event, i) {
        const inputs = this.getHostElement().querySelectorAll('.ax-input');
        if (this.type() === 'number') {
            const numberRegex = /^\d+$/;
            if (!numberRegex.test(event.target.value)) {
                event.target.value = '';
                return;
            }
        }
        if (event.target.value.length > 1) {
            const currentValue = event.target.value;
            event.target.value = '';
            event.target.value = currentValue.slice(-1);
        }
        if (inputs[i + 1]) {
            inputs[i + 1].select();
        }
        this.inputValues[i] = event.target.value;
        this._emitOnComplete();
    }
    /** @ignore */
    internalSetValue(value) {
        if (value) {
            this.inputValues = value?.toString().split('');
        }
        return value;
    }
    /** @ignore */
    calcFontSize() {
        const size = this.getHostElement().querySelector('.ax-input')?.clientWidth;
        const fontSize = size * 0.5;
        this.getHostElement().style.setProperty('--font-size', fontSize + 'px');
    }
    /** @ignore */
    _handleOnKeyDown(event, i) {
        const inputs = this.getHostElement().querySelectorAll('.ax-input');
        switch (event.key) {
            case 'Backspace':
                if (this.readonly || this.disabled)
                    return;
                inputs[i].value = '';
                if (inputs[i - 1]) {
                    inputs[i - 1].focus();
                    event.preventDefault();
                }
                this.inputValues[i] = ' ';
                this.commitValue(this.inputValues.join(''), true);
                inputs[i].value = '';
                break;
            case 'ArrowRight':
                if (inputs[i + 1]) {
                    event.preventDefault();
                    inputs[i + 1].select();
                }
                break;
            case 'ArrowLeft':
                if (inputs[i - 1]) {
                    event.preventDefault();
                    inputs[i - 1].select();
                }
                break;
            case 'Home':
                event.preventDefault();
                inputs[0].select();
                break;
            case 'End':
                event.preventDefault();
                inputs[this.length() - 1].select();
                break;
            case 'ArrowUp':
            case 'ArrowDown':
                event.preventDefault();
                break;
        }
    }
    /** @ignore */
    _handleOnPaste(event) {
        const inputs = this.getHostElement().querySelectorAll('.ax-input');
        const data = event.clipboardData.getData('text');
        const isNumber = /\d+/;
        if (isNumber.test(data)) {
            inputs[inputs.length - 1].focus();
            this.inputValues = [];
            for (let i = 0; i < inputs.length; i++) {
                this.inputValues[i] = data[i];
            }
            this._emitOnComplete();
        }
        event.preventDefault();
    }
    /** @ignore */
    _handleFocus(i) {
        const inputs = this.getHostElement().querySelectorAll('.ax-input');
        inputs[i].select();
    }
    /** @ignore */
    _emitOnComplete() {
        // TODO: Check Value delay
        setTimeout(() => {
            const filteredValues = this.inputValues.filter((c) => c && c !== ' ');
            const value = filteredValues.join('').trim();
            this.commitValue(value, true);
            this.onCompleted.emit({
                component: AXOtpComponent,
                value,
                isCompleted: filteredValues.length === this.length(),
            });
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXOtpComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXOtpComponent, isStandalone: true, selector: "ax-otp", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stateChange: "stateChange", disabledChange: "disabledChange", length: "lengthChange", onCompleted: "onCompleted" }, providers: [
            {
                provide: NG_VALUE_ACCESSOR,
                useExisting: forwardRef(() => AXOtpComponent),
                multi: true,
            },
            {
                provide: AXComponent,
                useExisting: AXOtpComponent,
            },
            { provide: AXValuableComponent, useExisting: AXOtpComponent },
            { provide: AXFocusableComponent, useExisting: AXOtpComponent },
        ], usesInheritance: true, ngImport: i0, template: "<div\n  dir=\"ltr\"\n  (paste)=\"_handleOnPaste($event)\"\n  class=\"ax-otp-input-container ax-editor-container ax-{{ look }}\"\n  [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs().length + ', minmax(0, 1fr))' }\"\n>\n  @for (input of inputs(); let i = $index; track i) {\n    <input\n      [type]=\"type()\"\n      maxlength=\"1\"\n      class=\"ax-input\"\n      [disabled]=\"disabled\"\n      [readonly]=\"readonly\"\n      (focus)=\"_handleFocus(i)\"\n      [ngModel]=\"inputValues[i]\"\n      [attr.disabled]=\"disabled\"\n      (input)=\"_handleOnInput($event, i)\"\n      [class.ax-state-disabled]=\"disabled\"\n      (keydown)=\"_handleOnKeyDown($event, i)\"\n      [class.ax-state-error]=\"state === 'error'\"\n      [class.ax-state-success]=\"state === 'success'\"\n    />\n  }\n</div>\n", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem;position:relative}ax-otp .ax-otp-input-container.ax-editor-container{height:auto;border-style:none;outline-color:transparent;overflow:initial;background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;outline:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input{border-radius:var(--ax-sys-border-radius);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-input-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-500));border-color:rgba(var(--ax-sys-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-sys-color-danger-500));border-color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-flat .ax-input{border-radius:0;border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-flat .ax-input:focus-within{border-color:rgba(var(--ax-sys-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-fill .ax-input{border-radius:var(--ax-sys-border-radius);background-color:rgba(var(--ax-sys-color-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-sys-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-sys-color-danger-50));color:rgba(var(--ax-sys-color-danger-fore-tint))}ax-otp .ax-otp-input-container.ax-editor-container.ax-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{aspect-ratio:1/1;overflow:hidden;text-align:center;font-size:var(--font-size, 2rem);padding:0}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{cursor:text;opacity:.75}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{cursor:not-allowed;opacity:.5}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input:focus-within,.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-lighter-surface));border-color:rgba(var(--ax-sys-color-primary-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error,.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error:focus-within,.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-sys-color-danger-lighter-surface));border-color:rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error .ax-input::placeholder,.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-flat .ax-input:focus-within{border-color:rgba(var(--ax-sys-color-primary-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-sys-color-primary-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-sys-color-danger-lighter-surface));color:rgba(var(--ax-sys-color-on-danger-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-lighter-surface))}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXOtpComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-otp', inputs: ['state', 'disabled', 'readonly', 'look'], outputs: ['stateChange', 'disabledChange'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef(() => AXOtpComponent),
                            multi: true,
                        },
                        {
                            provide: AXComponent,
                            useExisting: AXOtpComponent,
                        },
                        { provide: AXValuableComponent, useExisting: AXOtpComponent },
                        { provide: AXFocusableComponent, useExisting: AXOtpComponent },
                    ], imports: [NgStyle, FormsModule], template: "<div\n  dir=\"ltr\"\n  (paste)=\"_handleOnPaste($event)\"\n  class=\"ax-otp-input-container ax-editor-container ax-{{ look }}\"\n  [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs().length + ', minmax(0, 1fr))' }\"\n>\n  @for (input of inputs(); let i = $index; track i) {\n    <input\n      [type]=\"type()\"\n      maxlength=\"1\"\n      class=\"ax-input\"\n      [disabled]=\"disabled\"\n      [readonly]=\"readonly\"\n      (focus)=\"_handleFocus(i)\"\n      [ngModel]=\"inputValues[i]\"\n      [attr.disabled]=\"disabled\"\n      (input)=\"_handleOnInput($event, i)\"\n      [class.ax-state-disabled]=\"disabled\"\n      (keydown)=\"_handleOnKeyDown($event, i)\"\n      [class.ax-state-error]=\"state === 'error'\"\n      [class.ax-state-success]=\"state === 'success'\"\n    />\n  }\n</div>\n", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem;position:relative}ax-otp .ax-otp-input-container.ax-editor-container{height:auto;border-style:none;outline-color:transparent;overflow:initial;background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;outline:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input{border-radius:var(--ax-sys-border-radius);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-input-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-500));border-color:rgba(var(--ax-sys-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-sys-color-danger-500));border-color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-flat .ax-input{border-radius:0;border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-flat .ax-input:focus-within{border-color:rgba(var(--ax-sys-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-fill .ax-input{border-radius:var(--ax-sys-border-radius);background-color:rgba(var(--ax-sys-color-surface))}ax-otp .ax-otp-input-container.ax-editor-container.ax-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-sys-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-sys-color-danger-50));color:rgba(var(--ax-sys-color-danger-fore-tint))}ax-otp .ax-otp-input-container.ax-editor-container.ax-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{aspect-ratio:1/1;overflow:hidden;text-align:center;font-size:var(--font-size, 2rem);padding:0}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{cursor:text;opacity:.75}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{cursor:not-allowed;opacity:.5}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input:focus-within,.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-lighter-surface));border-color:rgba(var(--ax-sys-color-primary-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error,.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error:focus-within,.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-sys-color-danger-lighter-surface));border-color:rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-solid .ax-input.ax-state-error .ax-input::placeholder,.ax-dark ax-otp .ax-otp-input-container.ax-editor-container.ax-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-flat .ax-input:focus-within{border-color:rgba(var(--ax-sys-color-primary-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-sys-color-primary-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-sys-color-danger-lighter-surface));color:rgba(var(--ax-sys-color-on-danger-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-sys-color-danger-lighter-surface))}.ax-dark ax-otp .ax-otp-input-container.ax-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-sys-color-danger-lighter-surface))}\n"] }]
        }], ctorParameters: () => [] });

class AXOtpModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXOtpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: AXOtpModule, imports: [AXOtpComponent], exports: [AXOtpComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXOtpModule, imports: [AXOtpComponent] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXOtpModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [AXOtpComponent],
                    exports: [AXOtpComponent],
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { AXOtpCompletedEvent, AXOtpComponent, AXOtpModule };
//# sourceMappingURL=acorex-components-otp.mjs.map
