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 i2 from '@angular/cdk/clipboard';
import { ClipboardModule } from '@angular/cdk/clipboard';
import * as i3 from '@angular/material/tooltip';
import { MatTooltipModule } from '@angular/material/tooltip';
import * as i4 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i5 from '@asoftwareworld/form-builder-pro/core';
import { AswTranslateModule } from '@asoftwareworld/form-builder-pro/core';

/**
 * @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 AswJsonPreviewDialog {
    dialogRef;
    data;
    buttonTooltip = 'FormControl.CopyData';
    isCopyData = false;
    constructor(dialogRef, data) {
        this.dialogRef = dialogRef;
        this.data = data;
    }
    onNoClick() {
        this.dialogRef.close();
    }
    copyJsonData() {
        this.isCopyData = true;
        this.buttonTooltip = 'FormControl.Copied';
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswJsonPreviewDialog, 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: AswJsonPreviewDialog, selector: "asw-json-preview-dialog", ngImport: i0, template: "<mat-dialog-content class=\"mat-typography\">\r\n    <pre id=\"jsonPreviewContent\">{{data | json}}</pre>\r\n</mat-dialog-content>\r\n<mat-dialog-actions align=\"end\">\r\n    <button mat-raised-button\r\n            id=\"closeDialog\"\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.Close' | aswTranslate}}\r\n    </button>\r\n    <button mat-raised-button \r\n            id=\"copyData\"\r\n            (click)=\"copyJsonData()\"\r\n            type=\"button\"\r\n            class=\"asw-button asw-button-info asw-mb-1\"\r\n            [cdkCopyToClipboard]=\"data | json\"            \r\n            [disabled]=\"isCopyData\"\r\n            matTooltip=\"{{buttonTooltip | aswTranslate}}\"\r\n            cdkFocusInitial>\r\n        {{buttonTooltip | aswTranslate}}\r\n    </button>\r\n</mat-dialog-actions>", dependencies: [{ 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: "directive", type: i2.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i4.JsonPipe, name: "json" }, { kind: "pipe", type: i5.AswTranslatePipe, name: "aswTranslate" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswJsonPreviewDialog, decorators: [{
            type: Component,
            args: [{ selector: 'asw-json-preview-dialog', template: "<mat-dialog-content class=\"mat-typography\">\r\n    <pre id=\"jsonPreviewContent\">{{data | json}}</pre>\r\n</mat-dialog-content>\r\n<mat-dialog-actions align=\"end\">\r\n    <button mat-raised-button\r\n            id=\"closeDialog\"\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.Close' | aswTranslate}}\r\n    </button>\r\n    <button mat-raised-button \r\n            id=\"copyData\"\r\n            (click)=\"copyJsonData()\"\r\n            type=\"button\"\r\n            class=\"asw-button asw-button-info asw-mb-1\"\r\n            [cdkCopyToClipboard]=\"data | json\"            \r\n            [disabled]=\"isCopyData\"\r\n            matTooltip=\"{{buttonTooltip | aswTranslate}}\"\r\n            cdkFocusInitial>\r\n        {{buttonTooltip | aswTranslate}}\r\n    </button>\r\n</mat-dialog-actions>" }]
        }], 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 AswJsonPreviewDialogModule {
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswJsonPreviewDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.2", ngImport: i0, type: AswJsonPreviewDialogModule, declarations: [AswJsonPreviewDialog], imports: [CommonModule, MatDialogModule, ClipboardModule, AswTranslateModule, MatTooltipModule], exports: [AswJsonPreviewDialog] });
    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswJsonPreviewDialogModule, imports: [CommonModule, MatDialogModule, ClipboardModule, AswTranslateModule, MatTooltipModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswJsonPreviewDialogModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, MatDialogModule, ClipboardModule, AswTranslateModule, MatTooltipModule],
                    declarations: [AswJsonPreviewDialog],
                    exports: [AswJsonPreviewDialog]
                }]
        }] });

/**
 * @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 { AswJsonPreviewDialog, AswJsonPreviewDialogModule };
//# sourceMappingURL=asoftwareworld-form-builder-pro-form-control-json-preview-dialog.mjs.map
