import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "@angular/common";
const _c0 = function (a0) { return { "delete-button": a0 }; };
export class ConfirmationModalComponent {
    constructor(dialogRef, data) {
        this.dialogRef = dialogRef;
        this.data = data;
    }
    onNoClick() {
        this.dialogRef.close(false);
    }
    onYesClick() {
        this.dialogRef.close(true);
    }
}
ConfirmationModalComponent.ɵfac = function ConfirmationModalComponent_Factory(t) { return new (t || ConfirmationModalComponent)(i0.ɵɵdirectiveInject(i1.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
ConfirmationModalComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConfirmationModalComponent, selectors: [["comfirmation-modal"]], decls: 11, vars: 7, consts: [[1, "popup-container", "confirmation-popup"], [1, "close-icon", 3, "click"], [1, "action-btn-container"], [1, "stroke-btn", 3, "click"], ["cdkFocusInitial", "", 1, "delete-btn", 3, "ngClass", "click"]], template: function ConfirmationModalComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "button", 1);
        i0.ɵɵlistener("click", function ConfirmationModalComponent_Template_button_click_1_listener() { return ctx.onNoClick(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(2, "h1");
        i0.ɵɵtext(3);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "p");
        i0.ɵɵtext(5);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(6, "div", 2);
        i0.ɵɵelementStart(7, "button", 3);
        i0.ɵɵlistener("click", function ConfirmationModalComponent_Template_button_click_7_listener() { return ctx.onNoClick(); });
        i0.ɵɵtext(8);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "button", 4);
        i0.ɵɵlistener("click", function ConfirmationModalComponent_Template_button_click_9_listener() { return ctx.onYesClick(); });
        i0.ɵɵtext(10);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(ctx.data.title);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(ctx.data.message);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(ctx.data.cancelButtonText);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0, ctx.data.confirmButtonType === "delete"));
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate(ctx.data.confirmButtonText);
    } }, directives: [i2.NgClass], styles: [".confirmation-popup{min-width:350px!important;width:350px!important;max-width:350px!important}\n", ".popup-container{min-width:20vw;min-height:fit-content;width:fit-content;height:fit-content;max-width:75vw;max-height:75vh;font-family:Inter var,Roboto;font-size:.875rem;position:relative}.popup-container .popup-body{max-height:70vh;overflow:auto}.popup-container h1{font-family:Inter var,Roboto!important;color:#1b2b4b;font-size:1.125rem;font-weight:500;line-height:28px;margin:0 0 1rem;text-transform:capitalize;width:fit-content}.popup-container p{color:#475467;font-weight:400;margin:0;line-height:20px}.popup-container label:not(.mat-slide-toggle-label){display:block;color:#1b2b4b;font-weight:500;margin:0 0 .2rem}.popup-container label:not(.mat-slide-toggle-label) sup{color:#dc2626}.popup-container .close-icon{height:24px;width:24px;background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M18 6L6 18M6 6L18 18%22 stroke%3D%22%23667085%22 stroke-width%3D%222%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");background-position:center;background-size:100%;position:absolute;top:0;right:0;cursor:pointer}.popup-container .action-btn-container{display:flex;justify-content:right;gap:.5rem;margin:1.5rem 0 0}.popup-container input[type=text],.popup-container input[type=number],.popup-container input[type=email],.popup-container textarea{display:block;border:1px solid #D0D5DD;border-radius:.375rem;width:100%;padding:.5rem 1rem;color:#1b2b4b;resize:none}.popup-container input[type=text]::placeholder,.popup-container input[type=number]::placeholder,.popup-container input[type=email]::placeholder,.popup-container textarea::placeholder{color:#a5a5a5}.popup-container input[type=text]:focus,.popup-container input[type=number]:focus,.popup-container input[type=email]:focus,.popup-container textarea:focus{border:1px solid #6C52ED}.popup-container .err-message-container{height:14px;line-height:12px;width:100%;margin-top:2px}.popup-container .err-message-container .error-message{color:#dc2626;font-size:12px;float:right}.popup-container .invalid-input{border:1px solid #DC2626!important}.popup-container .checkbox-container{display:flex;justify-content:start;align-items:center}.popup-container .checkbox-container input[type=checkbox]{width:fit-content;margin:0 .5rem 0 0}.stroke-btn{box-sizing:border-box;padding:.5rem 1rem;border-radius:.5rem;font-size:1rem;font-weight:500;width:fit-content;text-transform:capitalize;background-color:#fff;border:1px solid #D0D5DD;color:#344054}.stroke-btn:hover{background-color:#eff6ff}.fill-btn{box-sizing:border-box;padding:.5rem 1rem;border-radius:.5rem;font-size:1rem;font-weight:500;width:fit-content;text-transform:capitalize;border:1px solid transparent;background-image:linear-gradient(to right,#4E4AEA,#3C88FC);color:#fff}.fill-btn:hover{opacity:.7}.publish-btn{box-sizing:border-box;padding:.5rem 1rem;border-radius:.5rem;font-size:1rem;font-weight:500;width:fit-content;text-transform:capitalize;border:none;background-color:#e19965;color:#fff}.publish-btn:hover{opacity:.7}.delete-btn{box-sizing:border-box;padding:.5rem 1rem;border-radius:.5rem;font-size:1rem;font-weight:500;width:fit-content;text-transform:capitalize;background-color:#fff;border:1px solid #D0D5DD;color:#dc2626}.delete-btn:hover{background-color:#eff6ff}\n"], encapsulation: 2 });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConfirmationModalComponent, [{
        type: Component,
        args: [{ selector: 'comfirmation-modal', encapsulation: ViewEncapsulation.None, template: "<div class=\"popup-container confirmation-popup\">\n  <button class=\"close-icon\" (click)=\"onNoClick()\"></button>\n  <h1>{{data.title}}</h1>\n  <p>{{data.message}}</p>\n  <div class=\"action-btn-container\">\n    <button class=\"stroke-btn\" (click)=\"onNoClick()\">{{data.cancelButtonText}}</button>\n    <button class=\"delete-btn\" [ngClass]=\"{'delete-button': data.confirmButtonType === 'delete'}\" (click)=\"onYesClick()\"\n      cdkFocusInitial>{{data.confirmButtonText}}</button>\n  </div>\n</div>", styles: [".confirmation-popup{min-width:350px!important;width:350px!important;max-width:350px!important}\n", ".popup-container{min-width:20vw;min-height:fit-content;width:fit-content;height:fit-content;max-width:75vw;max-height:75vh;font-family:Inter var,Roboto;font-size:.875rem;position:relative}.popup-container .popup-body{max-height:70vh;overflow:auto}.popup-container h1{font-family:Inter var,Roboto!important;color:#1b2b4b;font-size:1.125rem;font-weight:500;line-height:28px;margin:0 0 1rem;text-transform:capitalize;width:fit-content}.popup-container p{color:#475467;font-weight:400;margin:0;line-height:20px}.popup-container label:not(.mat-slide-toggle-label){display:block;color:#1b2b4b;font-weight:500;margin:0 0 .2rem}.popup-container label:not(.mat-slide-toggle-label) sup{color:#dc2626}.popup-container .close-icon{height:24px;width:24px;background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M18 6L6 18M6 6L18 18%22 stroke%3D%22%23667085%22 stroke-width%3D%222%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");background-position:center;background-size:100%;position:absolute;top:0;right:0;cursor:pointer}.popup-container .action-btn-container{display:flex;justify-content:right;gap:.5rem;margin:1.5rem 0 0}.popup-container input[type=text],.popup-container input[type=number],.popup-container input[type=email],.popup-container textarea{display:block;border:1px solid #D0D5DD;border-radius:.375rem;width:100%;padding:.5rem 1rem;color:#1b2b4b;resize:none}.popup-container input[type=text]::placeholder,.popup-container input[type=number]::placeholder,.popup-container input[type=email]::placeholder,.popup-container textarea::placeholder{color:#a5a5a5}.popup-container input[type=text]:focus,.popup-container input[type=number]:focus,.popup-container input[type=email]:focus,.popup-container textarea:focus{border:1px solid #6C52ED}.popup-container .err-message-container{height:14px;line-height:12px;width:100%;margin-top:2px}.popup-container .err-message-container .error-message{color:#dc2626;font-size:12px;float:right}.popup-container .invalid-input{border:1px solid #DC2626!important}.popup-container .checkbox-container{display:flex;justify-content:start;align-items:center}.popup-container .checkbox-container input[type=checkbox]{width:fit-content;margin:0 .5rem 0 0}.stroke-btn{box-sizing:border-box;padding:.5rem 1rem;border-radius:.5rem;font-size:1rem;font-weight:500;width:fit-content;text-transform:capitalize;background-color:#fff;border:1px solid #D0D5DD;color:#344054}.stroke-btn:hover{background-color:#eff6ff}.fill-btn{box-sizing:border-box;padding:.5rem 1rem;border-radius:.5rem;font-size:1rem;font-weight:500;width:fit-content;text-transform:capitalize;border:1px solid transparent;background-image:linear-gradient(to right,#4E4AEA,#3C88FC);color:#fff}.fill-btn:hover{opacity:.7}.publish-btn{box-sizing:border-box;padding:.5rem 1rem;border-radius:.5rem;font-size:1rem;font-weight:500;width:fit-content;text-transform:capitalize;border:none;background-color:#e19965;color:#fff}.publish-btn:hover{opacity:.7}.delete-btn{box-sizing:border-box;padding:.5rem 1rem;border-radius:.5rem;font-size:1rem;font-weight:500;width:fit-content;text-transform:capitalize;background-color:#fff;border:1px solid #D0D5DD;color:#dc2626}.delete-btn:hover{background-color:#eff6ff}\n"] }]
    }], function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
                type: Inject,
                args: [MAT_DIALOG_DATA]
            }] }]; }, null); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybWF0aW9uLW1vZGFsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3Qi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