/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes} checked by tsc
 */
import { Directive, ElementRef, Input, NgModule } from '@angular/core';
var IgxFocusDirective = /** @class */ (function () {
    function IgxFocusDirective(element) {
        this.element = element;
        this.focusState = true;
    }
    Object.defineProperty(IgxFocusDirective.prototype, "focused", {
        get: /**
         * Returns the state of the igxFocus.
         * ```typescript
         * \@ViewChild('focusContainer', {read: IgxFocusDirective})
         * public igxFocus: IgxFocusDirective;
         * let isFocusOn = this.igxFocus.focused;
         * ```
         * \@memberof IgxFocusDirective
         * @return {?}
         */
        function () {
            return this.focusState;
        },
        /**
         * Sets the state of the igxFocus.
         * ```html
         * <igx-input-group >
         *  <input #focusContainer igxInput [igxFocus]="true"/>
         * </igx-input-group>
         * ```
         * @memberof IgxFocusDirective
         */
        set: /**
         * Sets the state of the igxFocus.
         * ```html
         * <igx-input-group >
         *  <input #focusContainer igxInput [igxFocus]="true"/>
         * </igx-input-group>
         * ```
         * \@memberof IgxFocusDirective
         * @param {?} val
         * @return {?}
         */
        function (val) {
            this.focusState = val;
            this.trigger();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFocusDirective.prototype, "nativeElement", {
        /**
         * Gets the native element of the igxFocus.
         * ```typescript
         * @ViewChild('focusContainer', {read: IgxFocusDirective})
         * public igxFocus: IgxFocusDirective;
         * let igxFocusNativeElement = this.igxFocus.nativeElement;
         * ```
         * @memberof IgxFocusDirective
         */
        get: /**
         * Gets the native element of the igxFocus.
         * ```typescript
         * \@ViewChild('focusContainer', {read: IgxFocusDirective})
         * public igxFocus: IgxFocusDirective;
         * let igxFocusNativeElement = this.igxFocus.nativeElement;
         * ```
         * \@memberof IgxFocusDirective
         * @return {?}
         */
        function () {
            return this.element.nativeElement;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Triggers the igxFocus state.
     * ```typescript
     * @ViewChild('focusContainer', {read: IgxFocusDirective})
     * public igxFocus: IgxFocusDirective;
     * this.igxFocus.trigger();
     * ```
     * @memberof IgxFocusDirective
     */
    /**
     * Triggers the igxFocus state.
     * ```typescript
     * \@ViewChild('focusContainer', {read: IgxFocusDirective})
     * public igxFocus: IgxFocusDirective;
     * this.igxFocus.trigger();
     * ```
     * \@memberof IgxFocusDirective
     * @return {?}
     */
    IgxFocusDirective.prototype.trigger = /**
     * Triggers the igxFocus state.
     * ```typescript
     * \@ViewChild('focusContainer', {read: IgxFocusDirective})
     * public igxFocus: IgxFocusDirective;
     * this.igxFocus.trigger();
     * ```
     * \@memberof IgxFocusDirective
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.focusState) {
            requestAnimationFrame(function () { return _this.nativeElement.focus(); });
        }
    };
    IgxFocusDirective.decorators = [
        { type: Directive, args: [{
                    exportAs: 'igxFocus',
                    selector: '[igxFocus]'
                },] },
    ];
    /** @nocollapse */
    IgxFocusDirective.ctorParameters = function () { return [
        { type: ElementRef, },
    ]; };
    IgxFocusDirective.propDecorators = {
        "focused": [{ type: Input, args: ['igxFocus',] },],
    };
    return IgxFocusDirective;
}());
export { IgxFocusDirective };
function IgxFocusDirective_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxFocusDirective.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxFocusDirective.ctorParameters;
    /** @type {!Object<string,!Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
    IgxFocusDirective.propDecorators;
    /** @type {?} */
    IgxFocusDirective.prototype.focusState;
    /** @type {?} */
    IgxFocusDirective.prototype.element;
}
/**
 * The IgxFocusModule provides the {\@link IgxFocusDirective} inside your application.
 */
var IgxFocusModule = /** @class */ (function () {
    function IgxFocusModule() {
    }
    IgxFocusModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [IgxFocusDirective],
                    exports: [IgxFocusDirective]
                },] },
    ];
    return IgxFocusModule;
}());
export { IgxFocusModule };
function IgxFocusModule_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxFocusModule.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxFocusModule.ctorParameters;
}

//# sourceMappingURL=data:application/json;base64, 