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 RemoveDialogComponent {
    matDialogRef;
    result;
    constructor(matDialogRef) {
        this.matDialogRef = matDialogRef;
    }
    remove() {
        this.result = 'Remove';
        this.matDialogRef.close(this.result);
    }
    cancel() {
        this.result = 'Cancel';
        this.matDialogRef.close(this.result);
    }
    static ɵfac = function RemoveDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RemoveDialogComponent)(i0.ɵɵdirectiveInject(i1.MatLegacyDialogRef)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RemoveDialogComponent, selectors: [["ccd-remove-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", "Remove", 1, "button", "action-button", 3, "click"], ["type", "button", "title", "Cancel", 1, "button", "button-secondary", 3, "click"]], template: function RemoveDialogComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "h2", 1);
            i0.ɵɵlistener("click", function RemoveDialogComponent_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 RemoveDialogComponent_Template_button_click_13_listener() { return ctx.remove(); });
            i0.ɵɵtext(14);
            i0.ɵɵpipe(15, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(16, "button", 6);
            i0.ɵɵlistener("click", function RemoveDialogComponent_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 remove the item?"));
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(11, 6, "You are about to permanently remove an item, are you sure you want to remove this item?"), " ");
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 8, "Remove"));
            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(RemoveDialogComponent, [{
        type: Component,
        args: [{ selector: 'ccd-remove-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 remove the item?' | rpxTranslate}}</h2>\n  </div>\n  <div class=\"dialog-info\">\n    <span class=\"text-info\">\n      {{'You are about to permanently remove an item, are you sure you want to remove this item?' | rpxTranslate}}\n    </span>\n  </div>\n  <div>\n    <button type=\"button\" title=\"Remove\" class=\"button action-button\" (click)=\"remove()\">{{'Remove' | 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(RemoveDialogComponent, { className: "RemoveDialogComponent", filePath: "lib/shared/components/dialogs/remove-dialog/remove-dialog.component.ts", lineNumber: 9 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVtb3ZlLWRpYWxvZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jY2QtY2FzZS11aS10b29sa2l0L3NyYy9saWIvc2hhcmVkL2NvbXBvbmVudHMvZGlhbG9ncy9yZW1vdmUtZGlhbG9nL3JlbW92ZS1kaWFsb2cuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2NkLWNhc2UtdWktdG9vbGtpdC9zcmMvbGliL3NoYXJlZC9jb21wb25lbnRzL2RpYWxvZ3MvcmVtb3ZlLWRpYWxvZy9yZW1vdmUtZGlhbG9nLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUF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