import { AxoSnackBarType } from './axo-snack-bar.service';
import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MatSnackBarRef, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/snack-bar";
import * as i2 from "@angular/common";
function AxoSnackBarComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "div", 3);
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(2, "svg", 4);
    i0.ɵɵelement(3, "path", 5);
    i0.ɵɵelementEnd();
    i0.ɵɵnamespaceHTML();
    i0.ɵɵelementStart(4, "p", 6);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "span", 7);
    i0.ɵɵlistener("click", function AxoSnackBarComponent_div_1_Template_span_click_6_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.close(); });
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(7, "svg", 8);
    i0.ɵɵelement(8, "path", 9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r0.message);
} }
function AxoSnackBarComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "div", 3);
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(2, "svg", 10);
    i0.ɵɵelement(3, "path", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵnamespaceHTML();
    i0.ɵɵelementStart(4, "p", 12);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "span", 7);
    i0.ɵɵlistener("click", function AxoSnackBarComponent_div_2_Template_span_click_6_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.close(); });
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(7, "svg", 8);
    i0.ɵɵelement(8, "path", 9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.message);
} }
function AxoSnackBarComponent_div_3_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "div", 3);
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(2, "svg", 13);
    i0.ɵɵelement(3, "path", 14);
    i0.ɵɵelementEnd();
    i0.ɵɵnamespaceHTML();
    i0.ɵɵelementStart(4, "p", 15);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "span", 7);
    i0.ɵɵlistener("click", function AxoSnackBarComponent_div_3_Template_span_click_6_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.close(); });
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(7, "svg", 8);
    i0.ɵɵelement(8, "path", 9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r2.message);
} }
function AxoSnackBarComponent_div_4_Template(rf, ctx) { if (rf & 1) {
    const _r11 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "div", 3);
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(2, "svg", 16);
    i0.ɵɵelement(3, "path", 17);
    i0.ɵɵelementEnd();
    i0.ɵɵnamespaceHTML();
    i0.ɵɵelementStart(4, "p", 18);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "span", 7);
    i0.ɵɵlistener("click", function AxoSnackBarComponent_div_4_Template_span_click_6_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.close(); });
    i0.ɵɵnamespaceSVG();
    i0.ɵɵelementStart(7, "svg", 8);
    i0.ɵɵelement(8, "path", 9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r3.message);
} }
export class AxoSnackBarComponent {
    constructor(data, _snackRef) {
        this.data = data;
        this._snackRef = _snackRef;
        this.axoSnackBarType = AxoSnackBarType;
        this.message = data.message;
        this.action = data.action;
        this.type = data.type;
    }
    ngOnInit() {
    }
    /**
     * Close _snack bar
     */
    close() {
        this._snackRef.dismiss();
    }
}
AxoSnackBarComponent.ɵfac = function AxoSnackBarComponent_Factory(t) { return new (t || AxoSnackBarComponent)(i0.ɵɵdirectiveInject(MAT_SNACK_BAR_DATA), i0.ɵɵdirectiveInject(i1.MatSnackBarRef)); };
AxoSnackBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AxoSnackBarComponent, selectors: [["app-axo-snack-bar"]], decls: 5, vars: 5, consts: [[3, "ngSwitch"], ["class", "snackbar-wrapper", 4, "ngSwitchCase"], [1, "snackbar-wrapper"], [1, "flex", "items-center", "gap-3"], ["xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 20 20", "fill", "currentColor", 1, "w-8", "h-8", "text-green-500"], ["fill-rule", "evenodd", "d", "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", "clip-rule", "evenodd"], [1, "axo-font", "snackbar-text", "text-green-600"], [1, "inline-flex", "items-center", "cursor-pointer", 3, "click"], ["xmlns", "http://www.w3.org/2000/svg", "fill", "none", "viewBox", "0 0 24 24", "stroke", "currentColor", 1, "w-4", "h-4", "text-gray-600"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M6 18L18 6M6 6l12 12"], ["xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 20 20", "fill", "currentColor", 1, "w-6", "h-6", "text-blue-600"], ["fill-rule", "evenodd", "d", "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", "clip-rule", "evenodd"], [1, "axo-font", "snackbar-text", "text-blue-600"], ["xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 20 20", "fill", "currentColor", 1, "w-6", "h-6", "text-yellow-600"], ["fill-rule", "evenodd", "d", "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", "clip-rule", "evenodd"], [1, "axo-font", "snackbar-text", "text-yellow-600"], ["xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 20 20", "fill", "currentColor", 1, "w-6", "h-6", "text-red-600"], ["fill-rule", "evenodd", "d", "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z", "clip-rule", "evenodd"], [1, "axo-font", "snackbar-text", "text-red-600"]], template: function AxoSnackBarComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementContainerStart(0, 0);
        i0.ɵɵtemplate(1, AxoSnackBarComponent_div_1_Template, 9, 1, "div", 1);
        i0.ɵɵtemplate(2, AxoSnackBarComponent_div_2_Template, 9, 1, "div", 1);
        i0.ɵɵtemplate(3, AxoSnackBarComponent_div_3_Template, 9, 1, "div", 1);
        i0.ɵɵtemplate(4, AxoSnackBarComponent_div_4_Template, 9, 1, "div", 1);
        i0.ɵɵelementContainerEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("ngSwitch", ctx.type);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", ctx.axoSnackBarType.success);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", ctx.axoSnackBarType.info);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", ctx.axoSnackBarType.warning);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", ctx.axoSnackBarType.error);
    } }, directives: [i2.NgSwitch, i2.NgSwitchCase], styles: [".snackbar-wrapper{display:flex;align-items:center;justify-content:space-between;column-gap:.75rem}.snackbar-wrapper .snackbar-text{font-size:12px;font-weight:500;margin:0}.snackbar-panel-class{background-color:#fff!important;--tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05) !important;box-shadow:0 0 #0000,0 0 #0000,0 1px 2px #0000000d!important;border-radius:.375rem!important;border:1px solid #ccccccd1}.custom-snackbar{margin-top:50px;height:fit-content;padding:.3rem .6rem;box-sizing:border-box;display:flex;align-items:center;min-width:250px;width:fit-content;max-width:33vw}.custom-snackbar div:first-child{width:100%}\n"], encapsulation: 2 });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AxoSnackBarComponent, [{
        type: Component,
        args: [{ selector: 'app-axo-snack-bar', encapsulation: ViewEncapsulation.None, template: "\n<ng-container [ngSwitch]=\"type\">\n  <!--  success message -->\n  <div *ngSwitchCase=\"axoSnackBarType.success\" class=\"snackbar-wrapper\">\n    <div class=\"flex items-center gap-3\">\n        <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"w-8 h-8 text-green-500\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n            <path fill-rule=\"evenodd\"\n            d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\"\n            clip-rule=\"evenodd\" />\n        </svg>\n        <p class=\"axo-font snackbar-text text-green-600\">{{message}}</p>\n    </div>\n    <span class=\"inline-flex items-center cursor-pointer\" (click)=\"close()\">\n        <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"w-4 h-4 text-gray-600\" fill=\"none\" viewBox=\"0 0 24 24\"\n            stroke=\"currentColor\">\n            <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\n        </svg>\n    </span>\n  </div>\n  <!-- info message -->\n  <div *ngSwitchCase=\"axoSnackBarType.info\" class=\"snackbar-wrapper\">\n    <div class=\"flex items-center gap-3\">\n    <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"w-6 h-6 text-blue-600\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n        <path fill-rule=\"evenodd\"\n        d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z\"\n        clip-rule=\"evenodd\" />\n    </svg>\n    <p class=\"axo-font snackbar-text text-blue-600\">{{message}}</p>\n    </div>\n    <span class=\"inline-flex items-center cursor-pointer\" (click)=\"close()\">\n      <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"w-4 h-4 text-gray-600\" fill=\"none\" viewBox=\"0 0 24 24\"\n          stroke=\"currentColor\">\n          <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\n      </svg>\n    </span>\n  </div>\n  <!-- warning -->\n  <div *ngSwitchCase=\"axoSnackBarType.warning\" class=\"snackbar-wrapper\">\n    <div class=\"flex items-center gap-3\">\n    <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"w-6 h-6 text-yellow-600\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n        <path fill-rule=\"evenodd\"\n        d=\"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z\"\n        clip-rule=\"evenodd\" />\n    </svg>\n    <p class=\"axo-font snackbar-text text-yellow-600\">{{message}}</p>\n    </div>\n    <span class=\"inline-flex items-center cursor-pointer\" (click)=\"close()\">\n      <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"w-4 h-4 text-gray-600\" fill=\"none\" viewBox=\"0 0 24 24\"\n          stroke=\"currentColor\">\n          <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\n      </svg>\n    </span>\n  </div>\n\n  <!-- error message -->\n  <div  *ngSwitchCase=\"axoSnackBarType.error\" class=\"snackbar-wrapper\">\n    <div class=\"flex items-center gap-3\">\n    <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"w-6 h-6 text-red-600\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n        <path fill-rule=\"evenodd\"\n        d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z\"\n        clip-rule=\"evenodd\" />\n    </svg>\n    <p class=\"axo-font snackbar-text text-red-600\">{{message}}</p>\n    </div>\n    <span class=\"inline-flex items-center cursor-pointer\" (click)=\"close()\">\n      <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"w-4 h-4 text-gray-600\" fill=\"none\" viewBox=\"0 0 24 24\"\n          stroke=\"currentColor\">\n          <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\n      </svg>\n    </span>\n  </div>\n</ng-container>", styles: [".snackbar-wrapper{display:flex;align-items:center;justify-content:space-between;column-gap:.75rem}.snackbar-wrapper .snackbar-text{font-size:12px;font-weight:500;margin:0}.snackbar-panel-class{background-color:#fff!important;--tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05) !important;box-shadow:0 0 #0000,0 0 #0000,0 1px 2px #0000000d!important;border-radius:.375rem!important;border:1px solid #ccccccd1}.custom-snackbar{margin-top:50px;height:fit-content;padding:.3rem .6rem;box-sizing:border-box;display:flex;align-items:center;min-width:250px;width:fit-content;max-width:33vw}.custom-snackbar div:first-child{width:100%}\n"] }]
    }], function () { return [{ type: undefined, decorators: [{
                type: Inject,
                args: [MAT_SNACK_BAR_DATA]
            }] }, { type: i1.MatSnackBarRef }]; }, null); })();
//# sourceMappingURL=data:application/json;base64, 