/**
 * @fileoverview added by tsickle
 * Generated from: common/error/error-banner.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/*!
 * Copyright 2020 VMware, Inc.
 * SPDX-License-Identifier: BSD-2-Clause
 */
import { Component, EventEmitter, Input, Output } from '@angular/core';
/**
 * Component that displays the error message only if a non empty errorMessage is passed in
 */
var ErrorBannerComponent = /** @class */ (function () {
    function ErrorBannerComponent() {
        this._errorMessage = '';
        this.closed = true;
        /**
         * Emits events when the error banner is dismissed.
         */
        this.dismissed = new EventEmitter();
        /**
         * Sets clr-alert type
         */
        this.alertType = 'danger';
        /**
         * Marks clr-alert as closable or not
         */
        this.alertClosable = true;
        /**
         * Emits an event when the error message is changed.
         */
        this.errorMessageChange = new EventEmitter();
    }
    Object.defineProperty(ErrorBannerComponent.prototype, "errorMessage", {
        /**
         * Two way bound errorMessage, will be cleared when the user dismisses the alert
         */
        get: /**
         * Two way bound errorMessage, will be cleared when the user dismisses the alert
         * @return {?}
         */
        function () {
            return this._errorMessage;
        },
        /**
         * Sets the error message displayed by this error banner.
         */
        set: /**
         * Sets the error message displayed by this error banner.
         * @param {?} val
         * @return {?}
         */
        function (val) {
            this._errorMessage = val;
            this.closed = !val;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Clears the error message when the alert is closed.
     */
    /**
     * Clears the error message when the alert is closed.
     * @param {?} closed
     * @return {?}
     */
    ErrorBannerComponent.prototype.onAlertClosedChange = /**
     * Clears the error message when the alert is closed.
     * @param {?} closed
     * @return {?}
     */
    function (closed) {
        this._errorMessage = '';
        this.errorMessageChange.emit('');
        this.dismissed.next();
    };
    ErrorBannerComponent.decorators = [
        { type: Component, args: [{
                    selector: 'vcd-error-banner',
                    template: "<clr-alert\n    [(clrAlertClosed)]=\"closed\"\n    [clrAlertType]=\"alertType\"\n    [clrAlertClosable]=\"alertClosable\"\n    (clrAlertClosedChange)=\"onAlertClosedChange($event)\"\n>\n    <div class=\"alert-item\">\n        <span class=\"alert-text\">{{ errorMessage }}</span>\n    </div>\n</clr-alert>\n",
                    styles: ["/*!\n * Copyright 2020 VMware, Inc.\n * SPDX-License-Identifier: BSD-2-Clause\n */clr-alert ::ng-deep .alert{margin-left:24px;margin-right:24px}"]
                }] }
    ];
    ErrorBannerComponent.propDecorators = {
        dismissed: [{ type: Output }],
        errorMessage: [{ type: Input }],
        alertType: [{ type: Input }],
        alertClosable: [{ type: Input }],
        errorMessageChange: [{ type: Output }]
    };
    return ErrorBannerComponent;
}());
export { ErrorBannerComponent };
if (false) {
    /**
     * @type {?}
     * @private
     */
    ErrorBannerComponent.prototype._errorMessage;
    /** @type {?} */
    ErrorBannerComponent.prototype.closed;
    /**
     * Emits events when the error banner is dismissed.
     * @type {?}
     */
    ErrorBannerComponent.prototype.dismissed;
    /**
     * Sets clr-alert type
     * @type {?}
     */
    ErrorBannerComponent.prototype.alertType;
    /**
     * Marks clr-alert as closable or not
     * @type {?}
     */
    ErrorBannerComponent.prototype.alertClosable;
    /**
     * Emits an event when the error message is changed.
     * @type {?}
     */
    ErrorBannerComponent.prototype.errorMessageChange;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItYmFubmVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B2Y2QvdWktY29tcG9uZW50cy8iLCJzb3VyY2VzIjpbImNvbW1vbi9lcnJvci9lcnJvci1iYW5uZXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUtBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7QUFLdkU7SUFBQTtRQU1ZLGtCQUFhLEdBQUcsRUFBRSxDQUFDO1FBRTNCLFdBQU0sR0FBRyxJQUFJLENBQUM7Ozs7UUFLSixj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