/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
 */
import { Component, Input, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
/**
 * Global messages component for displaying global messages. Takes in an array of messages.
 *
 * @export
 */
var GlobalMessagesComponent = /** @class */ (function () {
    function GlobalMessagesComponent() {
    }
    /**
     * Determines if there are any messages to show by checking the array has some messages in it.
     *
     * \@memberof GlobalMessagesComponent
     * @return {?} true if there are some messages, false otherwise
     */
    GlobalMessagesComponent.prototype.hasMessages = /**
     * Determines if there are any messages to show by checking the array has some messages in it.
     *
     * \@memberof GlobalMessagesComponent
     * @return {?} true if there are some messages, false otherwise
     */
    function () {
        return this.messages && this.messages.length > 0;
    };
    /**
     * Closes a message, essentially by removing it from the array of messages.
     *
     * \@memberof GlobalMessagesComponent
     * @param {?} index the index position of the message to close
     * @return {?}
     */
    GlobalMessagesComponent.prototype.closeMessage = /**
     * Closes a message, essentially by removing it from the array of messages.
     *
     * \@memberof GlobalMessagesComponent
     * @param {?} index the index position of the message to close
     * @return {?}
     */
    function (index) {
        this.messages.splice(index, 1);
    };
    GlobalMessagesComponent.decorators = [
        { type: Component, args: [{
                    selector: 'es-global-messages',
                    template: "<ng-container *ngIf=\"hasMessages()\">\n  <div *ngFor=\"let msg of messages; let i = index\" class=\"notification messages-container is-{{ msg.severity }} media\">\n    <div class=\"media-left\">\n      <span class=\"icon is-medium\">\n        <i *ngIf=\"msg.severity==='danger'\" class=\"fas fa-times-circle fa-2x\"></i>\n        <i *ngIf=\"msg.severity==='warning'\" class=\"fas fa-info-circle fa-2x\"></i>\n        <i *ngIf=\"msg.severity==='info'\" class=\"fas fa-info-circle fa-2x\"></i>\n        <i *ngIf=\"msg.severity==='success'\" class=\"fas fa-check-circle fa-2x\"></i>\n      </span>\n    </div>\n    <div class=\"media-content\">\n    <h4 *ngIf=\"msg.heading\" class=\"title is-4\" [innerHTML]=\"msg.heading\"></h4>\n    <p *ngIf=\"msg.summary\" class=\"notification-text subtitle is-6\" [innerHTML]=\"msg.summary\"></p>\n    <!-- Assumes that if the summary was empty, we have some ng-content to display -->\n    <p *ngIf=\"!msg.summary\" class=\"notification-text subtitle is-6\">\n      <ng-content></ng-content>\n    </p>\n    </div>\n    <div class=\"media-right\" *ngIf=\"msg.closable\">\n      <button class=\"delete\" (click)=\"closeMessage(i)\" type=\"button\"></button>\n    </div>\n  </div>\n</ng-container>\n"
                }] }
    ];
    /** @nocollapse */
    GlobalMessagesComponent.ctorParameters = function () { return []; };
    GlobalMessagesComponent.propDecorators = {
        messages: [{ type: Input }]
    };
    return GlobalMessagesComponent;
}());
export { GlobalMessagesComponent };
if (false) {
    /**
     * The array of messages to show.
     * \@memberof GlobalMessagesComponent
     * @type {?}
     */
    GlobalMessagesComponent.prototype.messages;
}
/**
 * Interface to describe the properties a notification message should have.
 * @record
 */
export function Message() { }
/**
 * Severity, these match the class names of Bulma notifications, without the is- at the beginning.
 * @type {?}
 */
Message.prototype.severity;
/**
 * Heading of the message, this is optional.
 * @type {?|undefined}
 */
Message.prototype.heading;
/**
 * The text of the message, this is optional. Can contain standard HTML code but not any Angular code.
 * @type {?|undefined}
 */
Message.prototype.summary;
/**
 * Whether the message is closable.
 * @type {?}
 */
Message.prototype.closable;
/**
 * Global messages module providing anything to do with global messages.
 *
 * @export
 */
var GlobalMessagesModule = /** @class */ (function () {
    function GlobalMessagesModule() {
    }
    GlobalMessagesModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule],
                    exports: [GlobalMessagesComponent],
                    declarations: [GlobalMessagesComponent],
                },] }
    ];
    return GlobalMessagesModule;
}());
export { GlobalMessagesModule };

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