/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Icons } from '@asoftwareworld/form-builder-pro/common';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "@angular/material/button";
import * as i3 from "@angular/material/divider";
import * as i4 from "@asoftwareworld/form-builder-pro/core";
import * as i5 from "@asoftwareworld/form-builder-pro/common";
export class AswConfirmDialog {
    dialogRef;
    data;
    icons = Icons;
    constructor(dialogRef, data) {
        this.dialogRef = dialogRef;
        this.data = data;
    }
    onNoClick() {
        this.dialogRef.close();
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswConfirmDialog, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: AswConfirmDialog, selector: "asw-confirm-dialog", ngImport: i0, template: "<div class=\"asw-dialog-header\">\r\n    <div class=\"asw-edit-row-dialog\">\r\n        <div class=\"asw-dialog-header clearfix\">\r\n            <div class=\"asw-dialog-about\">\r\n                <h1 mat-dialog-title class=\"asw-m-0\">{{'FormControl.Warning' | aswTranslate}}!</h1>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <button mat-icon-button (click)=\"onNoClick()\" aria-label=\"Close dialog\" class=\"asw-mt-2 asw-me-2\">\r\n        <div [innerHTML]=\"icons.close | aswSafeHtml\"></div>\r\n    </button>\r\n</div>\r\n<mat-divider></mat-divider>\r\n<div mat-dialog-content class=\"mat-typography\">\r\n    <p id=\"confirmDialogContent\">{{data.message | aswTranslate}} </p>\r\n</div>\r\n<mat-divider></mat-divider>\r\n<div mat-dialog-actions align=\"end\">\r\n    <button id=\"no\"\r\n            type=\"button\"\r\n            class=\"asw-button asw-button-primary asw-mb-1 asw-me-2\"\r\n            (click)=\"onNoClick()\">\r\n        {{'FormControl.No' | aswTranslate}}\r\n    </button>\r\n    <button type=\"button\"\r\n            id=\"yes\"\r\n            class=\"asw-button asw-button-danger asw-mb-1\"\r\n            [mat-dialog-close]=\"data.name\"\r\n            cdkFocusInitial>\r\n         {{'FormControl.Yes' | aswTranslate}}\r\n    </button>\r\n</div>", dependencies: [{ kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "pipe", type: i4.AswTranslatePipe, name: "aswTranslate" }, { kind: "pipe", type: i5.AswSafeHtmlPipe, name: "aswSafeHtml" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswConfirmDialog, decorators: [{
            type: Component,
            args: [{ selector: 'asw-confirm-dialog', template: "<div class=\"asw-dialog-header\">\r\n    <div class=\"asw-edit-row-dialog\">\r\n        <div class=\"asw-dialog-header clearfix\">\r\n            <div class=\"asw-dialog-about\">\r\n                <h1 mat-dialog-title class=\"asw-m-0\">{{'FormControl.Warning' | aswTranslate}}!</h1>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <button mat-icon-button (click)=\"onNoClick()\" aria-label=\"Close dialog\" class=\"asw-mt-2 asw-me-2\">\r\n        <div [innerHTML]=\"icons.close | aswSafeHtml\"></div>\r\n    </button>\r\n</div>\r\n<mat-divider></mat-divider>\r\n<div mat-dialog-content class=\"mat-typography\">\r\n    <p id=\"confirmDialogContent\">{{data.message | aswTranslate}} </p>\r\n</div>\r\n<mat-divider></mat-divider>\r\n<div mat-dialog-actions align=\"end\">\r\n    <button id=\"no\"\r\n            type=\"button\"\r\n            class=\"asw-button asw-button-primary asw-mb-1 asw-me-2\"\r\n            (click)=\"onNoClick()\">\r\n        {{'FormControl.No' | aswTranslate}}\r\n    </button>\r\n    <button type=\"button\"\r\n            id=\"yes\"\r\n            class=\"asw-button asw-button-danger asw-mb-1\"\r\n            [mat-dialog-close]=\"data.name\"\r\n            cdkFocusInitial>\r\n         {{'FormControl.Yes' | aswTranslate}}\r\n    </button>\r\n</div>" }]
        }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }]; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1kaWFsb2cuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29tcG9uZW50cy9mb3JtLWNvbnRyb2wvY29uZmlybS1kaWFsb2cvY29uZmlybS1kaWFsb2cudHMiLCIuLi8uLi8uLi8uLi9zcmMvY29tcG9uZW50cy9mb3JtLWNvbnRyb2wvY29uZmlybS1kaWFsb2cvY29uZmlybS1kaWFsb2cuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNsRCxPQUFPLEVBQUUsWUFBWSxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ3pFLE9BQU8s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