/**
 * @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 { MAT_DIALOG_DATA } from '@angular/material/dialog';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "@angular/material/divider";
import * as i3 from "@asoftwareworld/form-builder/image-drawing";
import * as i4 from "@angular/forms";
export class AswDrawingDialog {
    constructor(dialogRef, control) {
        this.dialogRef = dialogRef;
        this.control = control;
        this.width = 600;
        this.height = 250;
    }
    onNoClick() {
        this.dialogRef.close();
    }
    onSubmit(aswEditPropertyForm) {
        if (aswEditPropertyForm.invalid) {
            return;
        }
        // this.model.displayName = this.control.displayName;
        // this.model.controlType = this.control.controlType;
        // this.model.name = this.name;
        // this.model.label = this.label;
        // this.model.tooltip = this.tooltip;
        // if (this.control.controlType !== 'radio' || this.control.controlType !== 'checkbox') {
        //     this.model.style = this.style;
        // }
        // this.model.isRequired = this.isRequired;
        // this.model.options = this.options;
        // this.dialogRef.close(this.model);
    }
}
AswDrawingDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswDrawingDialog, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
AswDrawingDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.4", type: AswDrawingDialog, selector: "asw-drawing-dialog", ngImport: i0, template: "<h4 mat-dialog-title>Edit Property</h4>\r\n<mat-divider></mat-divider>\r\n<form #aswEditPropertyForm=\"ngForm\" (ngSubmit)=\"onSubmit(aswEditPropertyForm)\" novalidate>\r\n    <mat-dialog-content class=\"mat-typography\">\r\n        <asw-image-drawing [width]=\"width\" [height]=\"height\"\r\n                       borderCss=\"1px solid black\"\r\n                       [showCancelButton]=\"false\"\r\n                       outputMimeType=\"'image/jpeg'\"\r\n                       [enableLoadAnotherImage]=\"true\" \r\n                       [enableRemoveImage]=\"true\"                \r\n                       [drawingSizes]=\"{ small: 3, medium: 10, large: 25, extra: 50 }\">\r\n        </asw-image-drawing>\r\n    </mat-dialog-content>\r\n    <mat-dialog-actions align=\"end\">\r\n        <button mat-raised-button\r\n                type=\"button\"\r\n                class=\"btn btn-danger mr-2 mb-1 me-2\"\r\n                (click)=\"onNoClick()\">\r\n            No\r\n        </button>\r\n        <button mat-raised-button type=\"submit\"\r\n                class=\"btn btn-primary mb-1\"\r\n                cdkFocusInitial>\r\n            Yes\r\n        </button>\r\n    </mat-dialog-actions>\r\n</form>", components: [{ type: i2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i3.AswImageDrawingComponent, selector: "asw-image-drawing", inputs: ["src", "width", "height", "forceSizeCanvas", "forceSizeExport", "enableRemoveImage", "enableLoadAnotherImage", "enableTooltip", "showCancelButton", "saveBtnText", "cancelBtnText", "loadingText", "loadingTemplate", "errorTemplate", "outputMimeType", "outputQuality", "drawingSizes", "colors"], outputs: ["save", "cancel"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswDrawingDialog, decorators: [{
            type: Component,
            args: [{ selector: 'asw-drawing-dialog', template: "<h4 mat-dialog-title>Edit Property</h4>\r\n<mat-divider></mat-divider>\r\n<form #aswEditPropertyForm=\"ngForm\" (ngSubmit)=\"onSubmit(aswEditPropertyForm)\" novalidate>\r\n    <mat-dialog-content class=\"mat-typography\">\r\n        <asw-image-drawing [width]=\"width\" [height]=\"height\"\r\n                       borderCss=\"1px solid black\"\r\n                       [showCancelButton]=\"false\"\r\n                       outputMimeType=\"'image/jpeg'\"\r\n                       [enableLoadAnotherImage]=\"true\" \r\n                       [enableRemoveImage]=\"true\"                \r\n                       [drawingSizes]=\"{ small: 3, medium: 10, large: 25, extra: 50 }\">\r\n        </asw-image-drawing>\r\n    </mat-dialog-content>\r\n    <mat-dialog-actions align=\"end\">\r\n        <button mat-raised-button\r\n                type=\"button\"\r\n                class=\"btn btn-danger mr-2 mb-1 me-2\"\r\n                (click)=\"onNoClick()\">\r\n            No\r\n        </button>\r\n        <button mat-raised-button type=\"submit\"\r\n                class=\"btn btn-primary mb-1\"\r\n                cdkFocusInitial>\r\n            Yes\r\n        </button>\r\n    </mat-dialog-actions>\r\n</form>" }]
        }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }]; } });
//# sourceMappingURL=data:application/json;base64, 