(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "@angular/core"], factory);
    }
})(function (require, exports) {
    "use strict";
    /**
     * @fileoverview added by tsickle
     * Generated from: lib/AlertControllerComponent.ts
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    Object.defineProperty(exports, "__esModule", { value: true });
    const core_1 = require("@angular/core");
    class AlertControllerComponent {
        constructor() {
            this._newError = new core_1.EventEmitter();
        }
        /**
         * @param {?} error
         * @return {?}
         */
        addError(error) {
            this._newError.emit(error);
            setTimeout((/**
             * @param {?} i
             * @return {?}
             */
            i => {
                this._newError.emit(null);
            }), 4000);
        }
        /**
         * @return {?}
         */
        ngOnInit() {
            this._newError.subscribe((/**
             * @param {?} i
             * @return {?}
             */
            i => {
                this.message = i;
            }));
        }
    }
    AlertControllerComponent.decorators = [
        { type: core_1.Component, args: [{
                    selector: 'lib-leaflet-map-alert',
                    template: `<div *ngIf="message" class="alert alert-danger alert-dismissible" role="alert">
              {{message}}
              <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>`
                }] }
    ];
    /** @nocollapse */
    AlertControllerComponent.ctorParameters = () => [];
    exports.AlertControllerComponent = AlertControllerComponent;
    if (false) {
        /** @type {?} */
        AlertControllerComponent.prototype.message;
        /** @type {?} */
        AlertControllerComponent.prototype._newError;
    }
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWxlcnRDb250cm9sbGVyQ29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGNpYWcvbGVhZmxldC1tYXAvIiwic291cmNlcyI6WyJsaWIvQWxlcnRDb250cm9sbGVyQ29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7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