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 DocumentDialogComponent {
    matDialogRef;
    result;
    constructor(matDialogRef) {
        this.matDialogRef = matDialogRef;
    }
    ngOnInit() {
    }
    replace() {
        this.result = 'Replace';
        this.matDialogRef.close(this.result);
    }
    cancel() {
        this.result = 'Cancel';
        this.matDialogRef.close(this.result);
    }
    static ɵfac = function DocumentDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DocumentDialogComponent)(i0.ɵɵdirectiveInject(i1.MatLegacyDialogRef)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DocumentDialogComponent, selectors: [["ccd-document-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", "Replace", 1, "button", "action-button", 3, "click"], ["type", "button", "title", "Cancel", 1, "button", "button-secondary", 3, "click"]], template: function DocumentDialogComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "h2", 1);
            i0.ɵɵlistener("click", function DocumentDialogComponent_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 DocumentDialogComponent_Template_button_click_13_listener() { return ctx.replace(); });
            i0.ɵɵtext(14);
            i0.ɵɵpipe(15, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(16, "button", 6);
            i0.ɵɵlistener("click", function DocumentDialogComponent_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 replace the existing file?"));
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 6, "You are about to delete the original file uploaded. Are you sure you want to proceed?"));
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 8, "Replace file"));
            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(DocumentDialogComponent, [{
        type: Component,
        args: [{ selector: 'ccd-document-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 replace the existing file?' | rpxTranslate}}</h2>\n  </div>\n  <div class=\"dialog-info\">\n    <span class=\"text-info\">{{'You are about to delete the original file uploaded. Are you sure you want to proceed?' | rpxTranslate}}</span>\n  </div>\n  <div>\n    <button type=\"button\" title=\"Replace\" class=\"button action-button\" (click)=\"replace()\">{{'Replace file' | 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(DocumentDialogComponent, { className: "DocumentDialogComponent", filePath: "lib/shared/components/dialogs/document-dialog/document-dialog.component.ts", lineNumber: 9 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9jdW1lbnQtZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NjZC1jYXNlLXVpLXRvb2xraXQvc3JjL2xpYi9zaGFyZWQvY29tcG9uZW50cy9kaWFsb2dzL2RvY3VtZW50LWRpYWxvZy9kb2N1bWVudC1kaWFsb2cuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2NkLWNhc2UtdWktdG9vbGtpdC9zcmMvbGliL3NoYXJlZC9jb21wb25lbnRzL2RpYWxvZ3MvZG9jdW1lbnQtZGlhbG9nL2RvY3VtZW50LWRpYWxvZy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVL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