import * as i0 from '@angular/core';
import { Directive, Input, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

class AutofocusDirective {
    constructor(el) {
        this.el = el;
        this._focus = true;
    }
    ngOnInit() {
        if (this._focus) {
            window.setTimeout(() => {
                this.el.nativeElement.focus();
            });
        }
    }
    set autofocus(condition) {
        this._focus = condition;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AutofocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: AutofocusDirective, selector: "[axAutofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AutofocusDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[axAutofocus]' }]
        }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { autofocus: [{
                type: Input
            }] } });

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

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

export { AutofocusDirective, AutofocusModule };
//# sourceMappingURL=aztrix-components-autofocus.mjs.map
