import { Component } from '@angular/core';
import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/legacy-dialog";
import * as i2 from "rpx-xui-translation";
export class DeleteOrCancelDialogComponent {
    matDialogRef;
    result;
    constructor(matDialogRef) {
        this.matDialogRef = matDialogRef;
    }
    delete() {
        this.result = 'Delete';
        this.matDialogRef.close(this.result);
    }
    cancel() {
        this.result = 'Cancel';
        this.matDialogRef.close(this.result);
    }
    static ɵfac = function DeleteOrCancelDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DeleteOrCancelDialogComponent)(i0.ɵɵdirectiveInject(i1.MatLegacyDialogRef)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DeleteOrCancelDialogComponent, selectors: [["ccd-delete-or-cancel-dialog"]], decls: 19, vars: 12, consts: [[1, "dialog-header"], [1, "heading-h2", "x", 3, "click"], [1, "heading-h2", "dialog-title"], [1, "dialog-info"], [1, "text-info"], ["type", "button", "title", "Delete", 1, "button", "action-button", 3, "click"], ["type", "button", "title", "Cancel", 1, "button", "button-secondary", 3, "click"]], template: function DeleteOrCancelDialogComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "h2", 1);
            i0.ɵɵlistener("click", function DeleteOrCancelDialogComponent_Template_h2_click_2_listener() { return ctx.cancel(); });
            i0.ɵɵtext(3, "X");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(4, "div")(5, "h2", 2);
            i0.ɵɵtext(6);
            i0.ɵɵpipe(7, "rpxTranslate");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(8, "div", 3)(9, "span", 4);
            i0.ɵɵtext(10);
            i0.ɵɵpipe(11, "rpxTranslate");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(12, "div")(13, "button", 5);
            i0.ɵɵlistener("click", function DeleteOrCancelDialogComponent_Template_button_click_13_listener() { return ctx.delete(); });
            i0.ɵɵtext(14);
            i0.ɵɵpipe(15, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(16, "button", 6);
            i0.ɵɵlistener("click", function DeleteOrCancelDialogComponent_Template_button_click_16_listener() { return ctx.cancel(); });
            i0.ɵɵtext(17);
            i0.ɵɵpipe(18, "rpxTranslate");
            i0.ɵɵelementEnd()()();
        } if (rf & 2) {
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 4, "Are you sure you want to delete this draft?"));
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 6, "You are about to delete this draft. Are you sure you want to proceed?"));
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 8, "Delete draft"));
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 10, "Cancel"));
        } }, dependencies: [i2.RpxTranslatePipe], styles: [".x[_ngcontent-%COMP%]{margin:0;padding:9px 9px 0 0;font-size:24px;font-weight:700;font-style:normal;font-stretch:normal;cursor:pointer;color:#6e7071}@media (prefers-color-scheme: dark){.dialog-title[_ngcontent-%COMP%], .dialog-info[_ngcontent-%COMP%]{color:#000}}.dialog-header[_ngcontent-%COMP%]{text-align:right}.dialog-title[_ngcontent-%COMP%], .dialog-info[_ngcontent-%COMP%]{margin:0 0 21px 25px}.action-button[_ngcontent-%COMP%]{margin:0 15px 0 25px}"] });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DeleteOrCancelDialogComponent, [{
        type: Component,
        args: [{ selector: 'ccd-delete-or-cancel-dialog', template: "<div>\n    <div class=\"dialog-header\">\n      <h2 (click)=\"cancel()\" class=\"heading-h2 x\">X</h2>\n    </div>\n    <div>\n      <h2 class=\"heading-h2 dialog-title\">{{'Are you sure you want to delete this draft?' | rpxTranslate}}</h2>\n    </div>\n    <div class=\"dialog-info\">\n      <span class=\"text-info\">{{'You are about to delete this draft. Are you sure you want to proceed?' | rpxTranslate}}</span>\n    </div>\n    <div>\n      <button type=\"button\" title=\"Delete\" class=\"button action-button\" (click)=\"delete()\">{{'Delete draft' | rpxTranslate}}</button>\n      <button type=\"button\" title=\"Cancel\" class=\"button button-secondary\" (click)=\"cancel()\">{{'Cancel' | rpxTranslate}}</button>\n    </div>\n</div>\n", styles: [".x{margin:0;padding:9px 9px 0 0;font-size:24px;font-weight:700;font-style:normal;font-stretch:normal;cursor:pointer;color:#6e7071}@media (prefers-color-scheme: dark){.dialog-title,.dialog-info{color:#000}}.dialog-header{text-align:right}.dialog-title,.dialog-info{margin:0 0 21px 25px}.action-button{margin:0 15px 0 25px}\n"] }]
    }], () => [{ type: i1.MatLegacyDialogRef }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DeleteOrCancelDialogComponent, { className: "DeleteOrCancelDialogComponent", filePath: "lib/shared/components/dialogs/delete-or-cancel-dialog/delete-or-cancel-dialog.component.ts", lineNumber: 9 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVsZXRlLW9yLWNhbmNlbC1kaWFsb2cuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2NkLWNhc2UtdWktdG9vbGtpdC9zcmMvbGliL3NoYXJlZC9jb21wb25lbnRzL2RpYWxvZ3MvZGVsZXRlLW9yLWNhbmNlbC1kaWFsb2cvZGVsZXRlLW9yLWNhbmNlbC1kaWFsb2cuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2NkLWNhc2UtdWktdG9vbGtpdC9zcmMvbGliL3NoYXJlZC9jb21wb25lbnRzL2RpYWxvZ3MvZGVsZXRlLW9yLWNhbmNlbC1kaWFsb2cvZ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