import { Component, Inject, ViewChild } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@angular/material/dialog";
import * as i3 from "@angular/common";
import * as i4 from "@angular/material/icon";
import * as i5 from "../button/button";
import * as i6 from "../../pipe/safe-html.pipe";
export class QMSConfirmDialog {
    constructor(fb, _elRef, dialogRef, data) {
        this.fb = fb;
        this._elRef = _elRef;
        this.dialogRef = dialogRef;
        console.log(data);
        this.info = { ...data };
    }
    ngOnInit() {
    }
    save() {
        this.dialogRef.close(true);
    }
    close() {
        this.dialogRef.close(false);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: QMSConfirmDialog, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.ElementRef }, { token: i2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: QMSConfirmDialog, selector: "qms-dialog-confirm", viewQueries: [{ propertyName: "actionGroup", first: true, predicate: ["actionGroup"], descendants: true }], ngImport: i0, template: "<div class=\"dialog-container\">\n  <ng-container *ngIf=\"info.title || info.normalTitle\">\n    <h3 mat-dialog-title class=\"title\" *ngIf=\"info.title\">{{info.title}}</h3>\n    <h3 mat-dialog-title class=\"title\" *ngIf=\"info.normalTitle\">\n      {{info.normalTitle}}\n      <button *ngIf=\"info.closeButton\" class=\"close-btn\" qms-btn-icon color=\"light\" (click)=\"close()\">\n        <mat-icon>close</mat-icon>\n      </button>\n    </h3>\n  </ng-container>\n\n  <mat-dialog-content [innerHTML]=\"info.body | safeHtml\"></mat-dialog-content>\n\n  <mat-dialog-actions align=\"end\" #actionGroup>\n    <button qms-btn-text class=\"cancel-btn\" (click)=\"close()\" *ngIf=\"info.cancelText\">\n      {{info.cancelText}}\n    </button>\n    <button *ngIf=\"info.buttonType == 'normal'\" qms-btn id=\"action-btn\" class=\"action-btn\" (click)=\"save()\">\n      {{info.actionText}}\n    </button>\n    <button *ngIf=\"info.buttonType == 'outline'\" qms-btn-text id=\"action-btn\" class=\"action-btn\" (click)=\"save()\">\n      {{info.actionText}}\n    </button>\n  </mat-dialog-actions>\n</div>", styles: ["::ng-deep .qms-dialog.dark-mode .mat-mdc-dialog-container{background-color:#323232}::ng-deep .qms-dialog.dark-mode .dialog-container{background-color:#323232}::ng-deep .qms-dialog.dark-mode .dialog-container h3.title,::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn,::ng-deep .qms-dialog.dark-mode .dialog-container .cancel-btn{color:#fff}::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn:hover,::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn:focus{color:#fff}::ng-deep .qms-dialog.dark-mode .dialog-container .mat-mdc-dialog-content{color:#fff9}::ng-deep .qms-dialog.dark-mode .dialog-container .action-btn{background:#b7daf8;color:#1954a9}::ng-deep .qms-dialog.dark-mode .qms-btn-icon.qms-light{color:#fff}::ng-deep .qms-dialog.dark-mode .qms-btn-icon.qms-light:hover{color:#fff}::ng-deep .qms-dialog .dialog-container .dialog-title{display:flex;justify-content:space-between;align-items:baseline;margin:0 0 10px}::ng-deep .qms-dialog .dialog-container .close-btn{color:#0009;padding:0}::ng-deep .qms-dialog .dialog-container .close-btn:hover,::ng-deep .qms-dialog .dialog-container .close-btn:focus{color:#0009}::ng-deep .qms-dialog .dialog-container .mat-mdc-dialog-content{font-size:14px;font-family:Open Sans}::ng-deep .qms-dialog .dialog-container .action-btn{margin-left:16px;order:2}::ng-deep .qms-dialog .dialog-container .action-btn.priority{order:1}::ng-deep .qms-dialog .dialog-container .cancel-btn{order:2}::ng-deep .qms-dialog .dialog-container h3.title{font-family:Raleway;font-size:1rem;line-height:22px;font-weight:600}::ng-deep .qms-dialog .dialog-container h3.title.text-normal{font-family:Open Sans;font-weight:400;line-height:28px;color:inherit}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.QMSButton, selector: "button[qms-btn], button[qms-btn-lg], button[qms-btn-outlined],\n               button[qms-btn-outlined-lg], button[qms-btn-text], button[qms-btn-text-lg],\n               button[qms-btn-fab],button[qms-btn-fab-sm],button[qms-btn-fab-ext],\n               button[qms-btn-fab-outlined],button[qms-btn-fab-outlined-sm],button[qms-btn-fab-outlined-ext]", inputs: ["disabled", "color"], exportAs: ["qmsButton"] }, { kind: "component", type: i5.QMSButtonIcon, selector: "button[qms-btn-icon]", inputs: ["disabled", "color", "active"], exportAs: ["qmsButtonIcon"] }, { kind: "pipe", type: i6.SafeHtmlPipe, name: "safeHtml" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: QMSConfirmDialog, decorators: [{
            type: Component,
            args: [{ selector: 'qms-dialog-confirm', template: "<div class=\"dialog-container\">\n  <ng-container *ngIf=\"info.title || info.normalTitle\">\n    <h3 mat-dialog-title class=\"title\" *ngIf=\"info.title\">{{info.title}}</h3>\n    <h3 mat-dialog-title class=\"title\" *ngIf=\"info.normalTitle\">\n      {{info.normalTitle}}\n      <button *ngIf=\"info.closeButton\" class=\"close-btn\" qms-btn-icon color=\"light\" (click)=\"close()\">\n        <mat-icon>close</mat-icon>\n      </button>\n    </h3>\n  </ng-container>\n\n  <mat-dialog-content [innerHTML]=\"info.body | safeHtml\"></mat-dialog-content>\n\n  <mat-dialog-actions align=\"end\" #actionGroup>\n    <button qms-btn-text class=\"cancel-btn\" (click)=\"close()\" *ngIf=\"info.cancelText\">\n      {{info.cancelText}}\n    </button>\n    <button *ngIf=\"info.buttonType == 'normal'\" qms-btn id=\"action-btn\" class=\"action-btn\" (click)=\"save()\">\n      {{info.actionText}}\n    </button>\n    <button *ngIf=\"info.buttonType == 'outline'\" qms-btn-text id=\"action-btn\" class=\"action-btn\" (click)=\"save()\">\n      {{info.actionText}}\n    </button>\n  </mat-dialog-actions>\n</div>", styles: ["::ng-deep .qms-dialog.dark-mode .mat-mdc-dialog-container{background-color:#323232}::ng-deep .qms-dialog.dark-mode .dialog-container{background-color:#323232}::ng-deep .qms-dialog.dark-mode .dialog-container h3.title,::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn,::ng-deep .qms-dialog.dark-mode .dialog-container .cancel-btn{color:#fff}::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn:hover,::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn:focus{color:#fff}::ng-deep .qms-dialog.dark-mode .dialog-container .mat-mdc-dialog-content{color:#fff9}::ng-deep .qms-dialog.dark-mode .dialog-container .action-btn{background:#b7daf8;color:#1954a9}::ng-deep .qms-dialog.dark-mode .qms-btn-icon.qms-light{color:#fff}::ng-deep .qms-dialog.dark-mode .qms-btn-icon.qms-light:hover{color:#fff}::ng-deep .qms-dialog .dialog-container .dialog-title{display:flex;justify-content:space-between;align-items:baseline;margin:0 0 10px}::ng-deep .qms-dialog .dialog-container .close-btn{color:#0009;padding:0}::ng-deep .qms-dialog .dialog-container .close-btn:hover,::ng-deep .qms-dialog .dialog-container .close-btn:focus{color:#0009}::ng-deep .qms-dialog .dialog-container .mat-mdc-dialog-content{font-size:14px;font-family:Open Sans}::ng-deep .qms-dialog .dialog-container .action-btn{margin-left:16px;order:2}::ng-deep .qms-dialog .dialog-container .action-btn.priority{order:1}::ng-deep .qms-dialog .dialog-container .cancel-btn{order:2}::ng-deep .qms-dialog .dialog-container h3.title{font-family:Raleway;font-size:1rem;line-height:22px;font-weight:600}::ng-deep .qms-dialog .dialog-container h3.title.text-normal{font-family:Open Sans;font-weight:400;line-height:28px;color:inherit}\n"] }]
        }], ctorParameters: () => [{ type: i1.UntypedFormBuilder }, { type: i0.ElementRef }, { type: i2.MatDialogRef }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }], propDecorators: { actionGroup: [{
                type: ViewChild,
                args: ['actionGroup']
            }] } });
export class QMSFormDialog {
    ngOnInit() {
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: QMSFormDialog, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: QMSFormDialog, selector: "qms-dialog-form", ngImport: i0, template: "<div class=\"dialog-container\">\n  <ng-content></ng-content>\n</div>\n", styles: ["::ng-deep .qms-dialog.dark-mode .mat-mdc-dialog-container{background-color:#323232}::ng-deep .qms-dialog.dark-mode .dialog-container{background-color:#323232}::ng-deep .qms-dialog.dark-mode .dialog-container h3.title,::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn,::ng-deep .qms-dialog.dark-mode .dialog-container .cancel-btn{color:#fff}::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn:hover,::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn:focus{color:#fff}::ng-deep .qms-dialog.dark-mode .dialog-container .mat-mdc-dialog-content{color:#fff9}::ng-deep .qms-dialog.dark-mode .dialog-container .action-btn{background:#b7daf8;color:#1954a9}::ng-deep .qms-dialog.dark-mode .qms-btn-icon.qms-light{color:#fff}::ng-deep .qms-dialog.dark-mode .qms-btn-icon.qms-light:hover{color:#fff}::ng-deep .qms-dialog .dialog-container .dialog-title{display:flex;justify-content:space-between;align-items:baseline;margin:0 0 10px}::ng-deep .qms-dialog .dialog-container .close-btn{color:#0009;padding:0}::ng-deep .qms-dialog .dialog-container .close-btn:hover,::ng-deep .qms-dialog .dialog-container .close-btn:focus{color:#0009}::ng-deep .qms-dialog .dialog-container .mat-mdc-dialog-content{font-size:14px;font-family:Open Sans}::ng-deep .qms-dialog .dialog-container .action-btn{margin-left:16px;order:2}::ng-deep .qms-dialog .dialog-container .action-btn.priority{order:1}::ng-deep .qms-dialog .dialog-container .cancel-btn{order:2}::ng-deep .qms-dialog .dialog-container h3.title{font-family:Raleway;font-size:1rem;line-height:22px;font-weight:600}::ng-deep .qms-dialog .dialog-container h3.title.text-normal{font-family:Open Sans;font-weight:400;line-height:28px;color:inherit}\n"] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: QMSFormDialog, decorators: [{
            type: Component,
            args: [{ selector: 'qms-dialog-form', template: "<div class=\"dialog-container\">\n  <ng-content></ng-content>\n</div>\n", styles: ["::ng-deep .qms-dialog.dark-mode .mat-mdc-dialog-container{background-color:#323232}::ng-deep .qms-dialog.dark-mode .dialog-container{background-color:#323232}::ng-deep .qms-dialog.dark-mode .dialog-container h3.title,::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn,::ng-deep .qms-dialog.dark-mode .dialog-container .cancel-btn{color:#fff}::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn:hover,::ng-deep .qms-dialog.dark-mode .dialog-container .close-btn:focus{color:#fff}::ng-deep .qms-dialog.dark-mode .dialog-container .mat-mdc-dialog-content{color:#fff9}::ng-deep .qms-dialog.dark-mode .dialog-container .action-btn{background:#b7daf8;color:#1954a9}::ng-deep .qms-dialog.dark-mode .qms-btn-icon.qms-light{color:#fff}::ng-deep .qms-dialog.dark-mode .qms-btn-icon.qms-light:hover{color:#fff}::ng-deep .qms-dialog .dialog-container .dialog-title{display:flex;justify-content:space-between;align-items:baseline;margin:0 0 10px}::ng-deep .qms-dialog .dialog-container .close-btn{color:#0009;padding:0}::ng-deep .qms-dialog .dialog-container .close-btn:hover,::ng-deep .qms-dialog .dialog-container .close-btn:focus{color:#0009}::ng-deep .qms-dialog .dialog-container .mat-mdc-dialog-content{font-size:14px;font-family:Open Sans}::ng-deep .qms-dialog .dialog-container .action-btn{margin-left:16px;order:2}::ng-deep .qms-dialog .dialog-container .action-btn.priority{order:1}::ng-deep .qms-dialog .dialog-container .cancel-btn{order:2}::ng-deep .qms-dialog .dialog-container h3.title{font-family:Raleway;font-size:1rem;line-height:22px;font-weight:600}::ng-deep .qms-dialog .dialog-container h3.title.text-normal{font-family:Open Sans;font-weight:400;line-height:28px;color:inherit}\n"] }]
        }] });
//# sourceMappingURL=data:application/json;base64, 