import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "rpx-xui-translation";
const _c0 = ["*"];
function AlertComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(1, "svg", 5);
    i0.ɵɵelement(2, "path", 6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} }
function AlertComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(1, "svg", 5);
    i0.ɵɵelement(2, "path", 6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} }
function AlertComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(1, "svg", 5);
    i0.ɵɵelement(2, "path", 7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} }
function AlertComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(1, "svg", 5);
    i0.ɵɵelement(2, "path", 8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} }
export var AlertMessageType;
(function (AlertMessageType) {
    AlertMessageType["WARNING"] = "warning";
    AlertMessageType["SUCCESS"] = "success";
    AlertMessageType["ERROR"] = "error";
    AlertMessageType["INFORMATION"] = "information";
})(AlertMessageType || (AlertMessageType = {}));
export class AlertComponent {
    // confirmation type has been removed as per EUI-3232
    static TYPE_WARNING = 'warning';
    static TYPE_SUCCESS = 'success';
    static TYPE_ERROR = 'error';
    static TYPE_INFORMATION = 'information';
    type;
    showIcon = true;
    alertMessageType = AlertMessageType;
    static ɵfac = function AlertComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AlertComponent)(); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0, decls: 11, vars: 12, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n      C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵelementContainerStart(1, 1);
            i0.ɵɵtemplate(2, AlertComponent_ng_container_2_Template, 3, 0, "ng-container", 2)(3, AlertComponent_ng_container_3_Template, 3, 0, "ng-container", 2)(4, AlertComponent_ng_container_4_Template, 3, 0, "ng-container", 2)(5, AlertComponent_ng_container_5_Template, 3, 0, "ng-container", 2);
            i0.ɵɵelementContainerEnd();
            i0.ɵɵelementStart(6, "div", 3)(7, "span", 4);
            i0.ɵɵtext(8);
            i0.ɵɵpipe(9, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵprojection(10);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵclassProp("hmcts-banner--warning", ctx.type === ctx.alertMessageType.WARNING || ctx.type === ctx.alertMessageType.ERROR)("hmcts-banner--success", ctx.type === ctx.alertMessageType.SUCCESS);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngSwitch", ctx.type);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngSwitchCase", ctx.alertMessageType.WARNING);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngSwitchCase", ctx.alertMessageType.ERROR);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngSwitchCase", ctx.alertMessageType.SUCCESS);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngSwitchCase", ctx.alertMessageType.INFORMATION);
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 10, ctx.type));
        } }, dependencies: [i1.NgSwitch, i1.NgSwitchCase, i2.RpxTranslatePipe], styles: [".alert[_ngcontent-%COMP%]:after{content:\"\";display:table;clear:both}.alert[_ngcontent-%COMP%]{color:#fff;padding:10px;font-size:16px;line-height:1.25}.alert-error[_ngcontent-%COMP%]{background-color:#df3034}.alert-warning[_ngcontent-%COMP%]{background-color:#912b88}.alert-success[_ngcontent-%COMP%], .alert-confirmation[_ngcontent-%COMP%]{background-color:#006435}.alert-success[_ngcontent-%COMP%]   .icon-tick[_ngcontent-%COMP%], .alert-confirmation[_ngcontent-%COMP%]   .icon-tick[_ngcontent-%COMP%]{height:20px;width:20px;background-size:cover}.alert-message[_ngcontent-%COMP%]{color:#fff;display:table-cell;font-weight:700}.alert-message[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], .alert-message[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:visited{color:#fff;text-decoration:underline}.alert[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:table-cell;vertical-align:top}.alert[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%] + .alert-message[_ngcontent-%COMP%]{padding-left:10px}"] });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AlertComponent, [{
        type: Component,
        args: [{ selector: 'cut-alert', template: "<div\n  class=\"hmcts-banner\"\n  [class.hmcts-banner--warning]=\"type === alertMessageType.WARNING || type === alertMessageType.ERROR\"\n  [class.hmcts-banner--success]=\"type === alertMessageType.SUCCESS\"\n>\n  <ng-container [ngSwitch]=\"type\">\n    <ng-container *ngSwitchCase=\"alertMessageType.WARNING\">\n      <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n        xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n        <path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\"></path>\n      </svg>\n    </ng-container>\n    <ng-container *ngSwitchCase=\"alertMessageType.ERROR\">\n      <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n        xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n        <path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\"></path>\n      </svg>\n    </ng-container>\n    <ng-container *ngSwitchCase=\"alertMessageType.SUCCESS\">\n      <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n        xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n        <path d=\"M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z\"></path>\n      </svg>\n    </ng-container>\n    <ng-container *ngSwitchCase=\"alertMessageType.INFORMATION\">\n      <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n        xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n        <path d=\"M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n      C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z\"></path>\n      </svg>\n    </ng-container>\n  </ng-container>\n  <div class=\"hmcts-banner__message\">\n    <span class=\"hmcts-banner__assistive\">{{type | rpxTranslate}}</span>\n    <ng-content></ng-content>\n  </div>\n</div>\n", styles: [".alert:after{content:\"\";display:table;clear:both}.alert{color:#fff;padding:10px;font-size:16px;line-height:1.25}.alert-error{background-color:#df3034}.alert-warning{background-color:#912b88}.alert-success,.alert-confirmation{background-color:#006435}.alert-success .icon-tick,.alert-confirmation .icon-tick{height:20px;width:20px;background-size:cover}.alert-message{color:#fff;display:table-cell;font-weight:700}.alert-message a,.alert-message a:visited{color:#fff;text-decoration:underline}.alert .icon{display:table-cell;vertical-align:top}.alert .icon+.alert-message{padding-left:10px}\n"] }]
    }], null, { type: [{
            type: Input
        }], showIcon: [{
            type: Input
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AlertComponent, { className: "AlertComponent", filePath: "lib/components/banners/alert/alert.component.ts", lineNumber: 17 }); })();
//# sourceMappingURL=data:application/json;base64, 