import { Component, EventEmitter, Input, Output } from '@angular/core';
import { BannerType } from '../models/qms-banner.model';
export class QmsBannerConfirmComponent {
    constructor() {
        this.type = BannerType.primary;
        this.contents = [];
        this.buttonClick = new EventEmitter();
    }
    onClickButton(event, button) {
        this.buttonClick.emit({
            event: event,
            button: button
        });
        if (button.action) {
            button.action();
        }
    }
}
QmsBannerConfirmComponent.decorators = [
    { type: Component, args: [{
                selector: 'qms-banner-confirm',
                template: "<div class=\"qms-banner-confirm-container banner-container-{{type}} text-color-{{type}} font-size-14 line-height-22\">\r\n    <div class=\"confirm-information\">\r\n        <mat-icon *ngIf=\"icon\" class=\"material-icons-outlined margin-right-18\">\r\n            {{ icon }}\r\n        </mat-icon>\r\n\r\n        <div class=\"qms-banner-confirm-container-content\">\r\n            <h1 class=\"title\" *ngIf=\"title\">\r\n                {{ title }}\r\n            </h1>\r\n\r\n            <div *ngIf=\"innerHTML\" class=\"qms-banner-container-text\" [innerHTML]=\"innerHTML\"></div>\r\n\r\n            <span *ngIf=\"!innerHTML\">\r\n                <span *ngFor=\"let content of contents\" [class.font-bold]=\"content.bold\" [qms-tool-tip]=\"content.tooltip\"\r\n                    mode=\"dark\">\r\n                    {{ content.text }}\r\n                </span>\r\n            </span>\r\n        </div>\r\n    </div>\r\n\r\n    <div class=\"actions banner-confirm-buttons\" *ngIf=\"buttons?.length > 0\">\r\n        <ng-container *ngFor=\"let button of buttons\">\r\n            <button *ngIf=\"!button.type\" qms-btn-text class=\"text-color-{{type}}\" mode=\"dark\"\r\n                [qms-tool-tip]=\"button.tooltip\" [hidden]=\"button.hidden && button.hidden()\"\r\n                [disabled]=\"button.disabled && button.disabled()\" (click)=\"onClickButton($event, button)\">\r\n                {{button.text}}\r\n            </button>\r\n\r\n            <button *ngIf=\"button.type === 1\" qms-btn-icon class=\"text-color-{{type}}\" [qms-tool-tip]=\"button.tooltip\"\r\n                [hidden]=\"button.hidden && button.hidden()\" [disabled]=\"button.disabled && button.disabled()\"\r\n                mode=\"dark\" (click)=\"onClickButton($event, button)\">\r\n                <mat-icon>{{ button.icon }}</mat-icon>\r\n            </button>\r\n        </ng-container>\r\n    </div>\r\n</div>",
                styles: [".banner-container-primary{background-color:#e5eefb;border-bottom:1px solid #1954a9}.banner-container-warning{background-color:rgba(228,207,83,.3);border-bottom:1px solid #e4cf53}.banner-container-success{background-color:rgba(0,128,76,.1);border-bottom:1px solid #00804c}.banner-container-error{background-color:rgba(176,0,32,.08);border-bottom:1px solid #b00020}.banner-container-light{background-color:#fafafa;border-bottom:1px solid rgba(0,0,0,.6)}.banner-container-none{background-color:#fff;border-bottom:1px solid rgba(0,0,0,.6)}.text-color-primary{color:#144285}.text-color-warning{color:#726729}.text-color-success{color:#005935}.text-color-error{color:#b00020}.text-color-light,.text-color-none{color:#323232}.qms-banner-confirm-container{width:100%;height:100%;font-family:Open Sans;padding:18px 16px 8px 18px;position:relative}.qms-banner-confirm-container-content .title{font-family:Raleway;font-size:16px;line-height:22px;font-weight:600;margin-bottom:4px}.qms-banner-confirm-container .margin-right-18{margin-right:18px}.qms-banner-confirm-container .confirm-information{display:flex;width:100%;padding-bottom:36px}.qms-banner-confirm-container .actions{position:absolute;right:8px;bottom:8px}.qms-banner-confirm-container .actions button{margin-left:16px}.qms-banner-confirm-container .actions.banner-confirm-buttons ::ng-deep button.qms-btn-icon.qms-btn-disabled{background:transparent}.qms-banner-confirm-container .actions.banner-confirm-buttons ::ng-deep button.qms-btn-text.qms-btn-disabled{background:transparent}.font-bold{font-weight:700}.font-size-14{font-size:14px}.line-height-22{line-height:22px}"]
            },] }
];
QmsBannerConfirmComponent.propDecorators = {
    type: [{ type: Input }],
    icon: [{ type: Input }],
    title: [{ type: Input }],
    innerHTML: [{ type: Input }],
    contents: [{ type: Input }],
    buttons: [{ type: Input }],
    buttonClick: [{ type: Output }]
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicW1zLWJhbm5lci1jb25maXJtLmNvbXBvbmVudC5qcyI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