/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes} checked by tsc
 */
import { Component, Input, ElementRef } from '@angular/core';
import { ActionSheetService } from './action-sheet.service';
var ActionSheetComponent = /** @class */ (function () {
    function ActionSheetComponent(actionSheetService, elementRef) {
        this.actionSheetService = actionSheetService;
        this.elementRef = elementRef;
        this.isPopUp = false;
        this._show = false;
        this.timer = null;
    }
    Object.defineProperty(ActionSheetComponent.prototype, "show", {
        get: /**
         * @return {?}
         */
        function () {
            return this._show;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            var _this = this;
            clearTimeout(this.timer);
            if (value) {
                this._show = value;
                this.timer = setTimeout(function () {
                    _this.isPopUp = value;
                }, 20);
            }
            else {
                this.isPopUp = value;
                this.timer = setTimeout(function () {
                    _this._show = value;
                }, 300);
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    ActionSheetComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.actionSheetService.push(this.elementRef.nativeElement);
    };
    ActionSheetComponent.decorators = [
        { type: Component, args: [{
                    selector: 'ui-action-sheet',
                    template: "<ui-mask [show]=\"isPopUp\">\n  <div class=\"ui-action-sheet\" [ngClass]=\"{'ui-show': show, 'ui-pop-up': isPopUp}\">\n    <ng-content></ng-content>\n  </div>\n</ui-mask>\n"
                },] },
    ];
    /** @nocollapse */
    ActionSheetComponent.ctorParameters = function () { return [
        { type: ActionSheetService, },
        { type: ElementRef, },
    ]; };
    ActionSheetComponent.propDecorators = {
        "show": [{ type: Input },],
    };
    return ActionSheetComponent;
}());
export { ActionSheetComponent };
function ActionSheetComponent_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    ActionSheetComponent.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    ActionSheetComponent.ctorParameters;
    /** @type {!Object<string,!Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
    ActionSheetComponent.propDecorators;
    /** @type {?} */
    ActionSheetComponent.prototype.isPopUp;
    /** @type {?} */
    ActionSheetComponent.prototype._show;
    /** @type {?} */
    ActionSheetComponent.prototype.timer;
    /** @type {?} */
    ActionSheetComponent.prototype.actionSheetService;
    /** @type {?} */
    ActionSheetComponent.prototype.elementRef;
}

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLXNoZWV0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B0YW5iby91aS1uYXRpdmUvIiwic291cmNlcyI6WyJsaWIvb3RoZXIvYWN0aW9uLXNoZWV0L2FjdGlvbi1zaGVldC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLFVBQVUsRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUVyRSxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQzs7SUFxQzFELDhCQUFvQixrQkFBc0MsRUFDdEM7UUFEQSx1QkFBa0IsR0FBbEIsa0JBQWtCLENBQW9CO1FBQ3RDLGVBQVUsR0FBVixVQUFVO3VCQU5YLEtBQUs7cUJBRUMsS0FBSztxQkFDVCxJQUFJO0tBSXhCOzBCQTFCRyxzQ0FBSTs7OztRQWVSO1lBQ0UsTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUM7U0FDbkI7Ozs7O2tCQWpCUSxLQUFjOztZQUNyQixZQUFZLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1lBQ3pCLEVBQUUsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7Z0JBQ1YsSUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7Z0JBQ25CLElBQUksQ0FBQyxLQUFLLEdBQ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