import * as i0 from '@angular/core';
import { Component, Inject, NgModule } from '@angular/core';
import * as i1 from '@angular/material/dialog';
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
import * as i5 from '@asoftwareworld/form-builder-pro/common';
import { Icons, AswPipeModule } from '@asoftwareworld/form-builder-pro/common';
import * as i2 from '@angular/material/button';
import { MatButtonModule } from '@angular/material/button';
import * as i3 from '@angular/material/divider';
import { MatDividerModule } from '@angular/material/divider';
import * as i4 from '@asoftwareworld/form-builder-pro/core';
import { AswTranslateModule } from '@asoftwareworld/form-builder-pro/core';
import { CommonModule } from '@angular/common';

/**
 * @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
 */
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]
                }] }]; } });

/**
 * @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
 */
class AswConfirmDialogModule {
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswConfirmDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.2", ngImport: i0, type: AswConfirmDialogModule, declarations: [AswConfirmDialog], imports: [CommonModule, MatDialogModule, MatButtonModule, MatDividerModule, AswTranslateModule, AswPipeModule], exports: [AswConfirmDialog] });
    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswConfirmDialogModule, imports: [CommonModule, MatDialogModule, MatButtonModule, MatDividerModule, AswTranslateModule, AswPipeModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswConfirmDialogModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, MatDialogModule, MatButtonModule, MatDividerModule, AswTranslateModule, AswPipeModule],
                    declarations: [AswConfirmDialog],
                    exports: [AswConfirmDialog]
                }]
        }] });

/**
 * @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
 */

/**
 * Generated bundle index. Do not edit.
 */

export { AswConfirmDialog, AswConfirmDialogModule };
//# sourceMappingURL=asoftwareworld-form-builder-pro-form-control-confirm-dialog.mjs.map
