import * as i0 from '@angular/core';
import { Component, Inject, EventEmitter, Input, Output, NgModule } from '@angular/core';
import { AswConfirmDialog, AswConfirmDialogModule } from '@asoftwareworld/form-builder/form-control/confirm-dialog';
import { Constants, ObjectUtils } from '@asoftwareworld/form-builder/form-control/core';
import * as i1$1 from '@angular/material/dialog';
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
import * as i1 from '@angular/forms';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import * as i3 from '@angular/material/divider';
import { MatDividerModule } from '@angular/material/divider';
import * as i4 from '@angular/material/form-field';
import { MatFormFieldModule } from '@angular/material/form-field';
import * as i5 from '@angular/material/select';
import { MatSelectModule } from '@angular/material/select';
import * as i6 from '@angular/material/core';
import * as i7 from '@angular/material/button-toggle';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import * as i8 from '@angular/material/icon';
import { MatIconModule } from '@angular/material/icon';
import * as i9 from '@angular/material/input';
import { MatInputModule } from '@angular/material/input';
import * as i10 from '@angular/material/tooltip';
import { MatTooltipModule } from '@angular/material/tooltip';
import * as i11 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i3$1 from '@asoftwareworld/form-builder/image-drawing';
import { AswImageDrawingModule } from '@asoftwareworld/form-builder/image-drawing';
import * as i2 from '@angular/material/button';
import { MatButtonModule } from '@angular/material/button';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';

/**
 * @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 AswSignatureControlDialog {
    constructor(formBuilder, dialogRef, control) {
        this.formBuilder = formBuilder;
        this.dialogRef = dialogRef;
        this.control = control;
        this.constants = Constants;
        this.objectUtils = ObjectUtils;
    }
    ngOnInit() {
        this.validateFormBuilder();
        this.editProperty(this.control);
    }
    validateFormBuilder() {
        this.aswSignatureForm = this.formBuilder.group({
            label: [],
            column: [],
            class: [],
            imageUrl: [],
            width: [],
            height: []
        });
    }
    editProperty(control) {
        this.aswSignatureForm.setValue({
            label: control.label,
            class: control.class,
            column: control.column,
            imageUrl: control.imageUrl,
            width: control.width,
            height: control.height
        });
    }
    onNoClick() {
        this.dialogRef.close();
    }
    onSubmit() {
        if (this.aswSignatureForm.invalid) {
            return;
        }
        this.aswSignatureForm.value.controlType = this.control.controlType;
        this.dialogRef.close(this.aswSignatureForm.value);
    }
}
AswSignatureControlDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswSignatureControlDialog, deps: [{ token: i1.FormBuilder }, { token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
AswSignatureControlDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.4", type: AswSignatureControlDialog, selector: "asw-signature-control-dialog", ngImport: i0, template: "<h4 mat-dialog-title>Edit Property</h4>\r\n<mat-divider></mat-divider>\r\n<form [formGroup]=\"aswSignatureForm\" (ngSubmit)=\"onSubmit()\">\r\n    <mat-dialog-content class=\"mat-typography\">\r\n        <div class=\"asw-full-width\"><br>\r\n            <div class=\"row\">\r\n                <div class=\"col-md-12\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n                        <mat-label>Label</mat-label>\r\n                        <input matInput type=\"text\"\r\n                                        name=\"label\"\r\n                                        placeholder=\"Enter label\"\r\n                                        matTooltip=\"Enter label\"\r\n                                        formControlName=\"label\">\r\n                    </mat-form-field>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n                        <mat-label>Image url</mat-label>\r\n                        <input matInput type=\"text\"\r\n                                        name=\"label\"\r\n                                        placeholder=\"Enter image url\"\r\n                                        matTooltip=\"Enter label\"\r\n                                        formControlName=\"imageUrl\">\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n                        <mat-label>Column Size</mat-label>\r\n                        <mat-select formControlName=\"column\" matTooltip=\"Select column size\">\r\n                            <mat-option *ngFor=\"let column of constants.columns\" [value]=\"column.value\">\r\n                                {{column.label}}\r\n                            </mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n                        <mat-label>Width</mat-label>\r\n                        <input matInput type=\"number\"\r\n                                        name=\"width\"\r\n                                        placeholder=\"Enter width\"\r\n                                        (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n                                        matTooltip=\"Enter width\"\r\n                                        formControlName=\"width\">\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n                        <mat-label>Height</mat-label>\r\n                        <input matInput type=\"number\"\r\n                                        name=\"height\"\r\n                                        placeholder=\"Enter height\"\r\n                                        (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n                                        matTooltip=\"Enter height\"\r\n                                        formControlName=\"height\">\r\n                    </mat-form-field>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-md-12\">\r\n                    Text style: \r\n                    <mat-button-toggle-group formControlName=\"class\" name=\"fontStyle\" aria-label=\"Font Style\">\r\n                        <mat-button-toggle value=\"text-left text-start\" aria-label=\"Text align left\">\r\n                            <mat-icon>format_align_left</mat-icon>\r\n                        </mat-button-toggle>\r\n                        <mat-button-toggle value=\"mx-auto text-center\" aria-label=\"Text align center\">\r\n                            <mat-icon>format_align_center</mat-icon>\r\n                        </mat-button-toggle>\r\n                        <mat-button-toggle value=\"text-right text-end\" aria-label=\"Text align right\">\r\n                            <mat-icon>format_align_right</mat-icon>\r\n                        </mat-button-toggle>\r\n                    </mat-button-toggle-group>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </mat-dialog-content>\r\n    <mat-dialog-actions align=\"end\">\r\n        <button 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 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>\r\n\r\n", components: [{ type: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i4.MatLabel, selector: "mat-label" }, { type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i7.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswSignatureControlDialog, decorators: [{
            type: Component,
            args: [{ selector: 'asw-signature-control-dialog', template: "<h4 mat-dialog-title>Edit Property</h4>\r\n<mat-divider></mat-divider>\r\n<form [formGroup]=\"aswSignatureForm\" (ngSubmit)=\"onSubmit()\">\r\n    <mat-dialog-content class=\"mat-typography\">\r\n        <div class=\"asw-full-width\"><br>\r\n            <div class=\"row\">\r\n                <div class=\"col-md-12\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n                        <mat-label>Label</mat-label>\r\n                        <input matInput type=\"text\"\r\n                                        name=\"label\"\r\n                                        placeholder=\"Enter label\"\r\n                                        matTooltip=\"Enter label\"\r\n                                        formControlName=\"label\">\r\n                    </mat-form-field>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n                        <mat-label>Image url</mat-label>\r\n                        <input matInput type=\"text\"\r\n                                        name=\"label\"\r\n                                        placeholder=\"Enter image url\"\r\n                                        matTooltip=\"Enter label\"\r\n                                        formControlName=\"imageUrl\">\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n                        <mat-label>Column Size</mat-label>\r\n                        <mat-select formControlName=\"column\" matTooltip=\"Select column size\">\r\n                            <mat-option *ngFor=\"let column of constants.columns\" [value]=\"column.value\">\r\n                                {{column.label}}\r\n                            </mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n                        <mat-label>Width</mat-label>\r\n                        <input matInput type=\"number\"\r\n                                        name=\"width\"\r\n                                        placeholder=\"Enter width\"\r\n                                        (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n                                        matTooltip=\"Enter width\"\r\n                                        formControlName=\"width\">\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n                        <mat-label>Height</mat-label>\r\n                        <input matInput type=\"number\"\r\n                                        name=\"height\"\r\n                                        placeholder=\"Enter height\"\r\n                                        (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n                                        matTooltip=\"Enter height\"\r\n                                        formControlName=\"height\">\r\n                    </mat-form-field>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-md-12\">\r\n                    Text style: \r\n                    <mat-button-toggle-group formControlName=\"class\" name=\"fontStyle\" aria-label=\"Font Style\">\r\n                        <mat-button-toggle value=\"text-left text-start\" aria-label=\"Text align left\">\r\n                            <mat-icon>format_align_left</mat-icon>\r\n                        </mat-button-toggle>\r\n                        <mat-button-toggle value=\"mx-auto text-center\" aria-label=\"Text align center\">\r\n                            <mat-icon>format_align_center</mat-icon>\r\n                        </mat-button-toggle>\r\n                        <mat-button-toggle value=\"text-right text-end\" aria-label=\"Text align right\">\r\n                            <mat-icon>format_align_right</mat-icon>\r\n                        </mat-button-toggle>\r\n                    </mat-button-toggle-group>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </mat-dialog-content>\r\n    <mat-dialog-actions align=\"end\">\r\n        <button 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 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>\r\n\r\n" }]
        }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i1$1.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 AswSignatureDialog {
    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.dialogRef.close(this.control);
    }
    saveImage(blob) {
        const reader = new FileReader();
        reader.readAsDataURL(blob);
        reader.onloadend = () => {
            const base64data = reader.result;
            this.control.imageUrl = base64data;
        };
    }
}
AswSignatureDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswSignatureDialog, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
AswSignatureDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.4", type: AswSignatureDialog, selector: "asw-signature-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                       (save)=\"saveImage($event)\"\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 type=\"button\"\r\n                class=\"btn btn-danger mr-2 me-2 mb-1\"\r\n                (click)=\"onNoClick()\">\r\n            No\r\n        </button>\r\n        <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: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i3$1.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$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswSignatureDialog, decorators: [{
            type: Component,
            args: [{ selector: 'asw-signature-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                       (save)=\"saveImage($event)\"\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 type=\"button\"\r\n                class=\"btn btn-danger mr-2 me-2 mb-1\"\r\n                (click)=\"onNoClick()\">\r\n            No\r\n        </button>\r\n        <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$1.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 AswSignature {
    constructor(dialog) {
        this.dialog = dialog;
        this.constants = Constants;
        this.isPreviewTemplate = false;
        this.signatureUpdateEvent = new EventEmitter();
        this.signatureDeleteEvent = new EventEmitter();
        this.duplicateControl = new EventEmitter();
        this.imageUrl = 'https://i.pinimg.com/236x/d6/27/d9/d627d9cda385317de4812a4f7bd922e9--man--iron-man.jpg';
    }
    deleteSignatureDialog(control, controlIndex) {
        const dialogRef = this.dialog.open(AswConfirmDialog, {
            width: '350px',
            data: { name: control.controlType, message: this.constants.messages.waringMessage }
        });
        dialogRef.afterClosed().subscribe(result => {
            if (result !== undefined) {
                this.signatureDeleteEvent.emit(controlIndex);
            }
        });
    }
    signatureDialog(control, controlIndex) {
        const dialogRef = this.dialog.open(AswSignatureDialog, {
            disableClose: true,
            width: '744px',
            data: control
        });
        dialogRef.afterClosed().subscribe(result => {
            if (result !== undefined) {
                this.signatureUpdateEvent.emit({ control: result, index: controlIndex });
            }
        });
    }
    editSignatureDialog(control, controlIndex) {
        const dialogRef = this.dialog.open(AswSignatureControlDialog, {
            disableClose: true,
            width: '744px',
            data: control
        });
        dialogRef.afterClosed().subscribe(result => {
            if (result !== undefined) {
                this.signatureUpdateEvent.emit({ control: result, index: controlIndex });
            }
        });
    }
    duplicateSignatureControl(control) {
        this.duplicateControl.emit(control);
    }
}
AswSignature.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswSignature, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
AswSignature.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.4", type: AswSignature, selector: "asw-signature", inputs: { control: "control", controlIndex: "controlIndex", isPreviewTemplate: "isPreviewTemplate" }, outputs: { signatureUpdateEvent: "signatureUpdateEvent", signatureDeleteEvent: "signatureDeleteEvent", duplicateControl: "duplicateControl" }, ngImport: i0, template: "<div class=\"{{control.class}}\">\r\n    <img src=\"{{control.imageUrl}}\" [height]=\"control.height\" [width]=\"control.width\"/>\r\n</div>\r\n<div class=\"row\" *ngIf=\"isPreviewTemplate\">\r\n    <div class=\"col-md-12\">\r\n        <button mat-icon-button \r\n                type=\"button\" \r\n                matTooltip=\"Duplicate\" \r\n                [matTooltipPosition]=\"'below'\" \r\n                (click)=\"duplicateSignatureControl(control)\">\r\n            <mat-icon>content_copy</mat-icon>\r\n        </button>\r\n        <button mat-icon-button \r\n                type=\"button\" \r\n                matTooltip=\"Edit\" \r\n                [matTooltipPosition]=\"'below'\"\r\n                (click)=\"editSignatureDialog(control, controlIndex)\">\r\n            <mat-icon>edit</mat-icon>\r\n        </button>\r\n        <button mat-icon-button \r\n                type=\"button\" \r\n                matTooltip=\"Signature\" \r\n                [matTooltipPosition]=\"'below'\"\r\n                (click)=\"signatureDialog(control, controlIndex)\">\r\n            <mat-icon>gesture</mat-icon>\r\n        </button>\r\n        <button mat-icon-button \r\n                type=\"button\" \r\n                matTooltip=\"Delete\" \r\n                [matTooltipPosition]=\"'below'\"\r\n                (click)=\"deleteSignatureDialog(control, controlIndex)\">\r\n            <mat-icon>delete</mat-icon>\r\n        </button>\r\n    </div>\r\n</div>", components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button],             button[mat-fab], button[mat-mini-fab], button[mat-stroked-button],             button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswSignature, decorators: [{
            type: Component,
            args: [{ selector: 'asw-signature', template: "<div class=\"{{control.class}}\">\r\n    <img src=\"{{control.imageUrl}}\" [height]=\"control.height\" [width]=\"control.width\"/>\r\n</div>\r\n<div class=\"row\" *ngIf=\"isPreviewTemplate\">\r\n    <div class=\"col-md-12\">\r\n        <button mat-icon-button \r\n                type=\"button\" \r\n                matTooltip=\"Duplicate\" \r\n                [matTooltipPosition]=\"'below'\" \r\n                (click)=\"duplicateSignatureControl(control)\">\r\n            <mat-icon>content_copy</mat-icon>\r\n        </button>\r\n        <button mat-icon-button \r\n                type=\"button\" \r\n                matTooltip=\"Edit\" \r\n                [matTooltipPosition]=\"'below'\"\r\n                (click)=\"editSignatureDialog(control, controlIndex)\">\r\n            <mat-icon>edit</mat-icon>\r\n        </button>\r\n        <button mat-icon-button \r\n                type=\"button\" \r\n                matTooltip=\"Signature\" \r\n                [matTooltipPosition]=\"'below'\"\r\n                (click)=\"signatureDialog(control, controlIndex)\">\r\n            <mat-icon>gesture</mat-icon>\r\n        </button>\r\n        <button mat-icon-button \r\n                type=\"button\" \r\n                matTooltip=\"Delete\" \r\n                [matTooltipPosition]=\"'below'\"\r\n                (click)=\"deleteSignatureDialog(control, controlIndex)\">\r\n            <mat-icon>delete</mat-icon>\r\n        </button>\r\n    </div>\r\n</div>" }]
        }], ctorParameters: function () { return [{ type: i1$1.MatDialog }]; }, propDecorators: { control: [{
                type: Input
            }], controlIndex: [{
                type: Input
            }], isPreviewTemplate: [{
                type: Input
            }], signatureUpdateEvent: [{
                type: Output
            }], signatureDeleteEvent: [{
                type: Output
            }], duplicateControl: [{
                type: Output
            }] } });

/**
 * @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 AswSignatureModule {
}
AswSignatureModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswSignatureModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
AswSignatureModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswSignatureModule, declarations: [AswSignature,
        AswSignatureDialog,
        AswSignatureControlDialog], imports: [CommonModule,
        FormsModule,
        ReactiveFormsModule,
        MatInputModule,
        MatSelectModule,
        MatDialogModule,
        MatSlideToggleModule,
        MatDividerModule,
        MatIconModule,
        MatTooltipModule,
        AswImageDrawingModule,
        AswConfirmDialogModule,
        MatButtonModule,
        MatFormFieldModule,
        MatSelectModule,
        MatButtonToggleModule,
        MatInputModule], exports: [AswSignature,
        AswSignatureDialog,
        AswSignatureControlDialog] });
AswSignatureModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswSignatureModule, imports: [[
            CommonModule,
            FormsModule,
            ReactiveFormsModule,
            MatInputModule,
            MatSelectModule,
            MatDialogModule,
            MatSlideToggleModule,
            MatDividerModule,
            MatIconModule,
            MatTooltipModule,
            AswImageDrawingModule,
            AswConfirmDialogModule,
            MatButtonModule,
            MatFormFieldModule,
            MatSelectModule,
            MatButtonToggleModule,
            MatInputModule
        ]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswSignatureModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [
                        CommonModule,
                        FormsModule,
                        ReactiveFormsModule,
                        MatInputModule,
                        MatSelectModule,
                        MatDialogModule,
                        MatSlideToggleModule,
                        MatDividerModule,
                        MatIconModule,
                        MatTooltipModule,
                        AswImageDrawingModule,
                        AswConfirmDialogModule,
                        MatButtonModule,
                        MatFormFieldModule,
                        MatSelectModule,
                        MatButtonToggleModule,
                        MatInputModule
                    ],
                    declarations: [
                        AswSignature,
                        AswSignatureDialog,
                        AswSignatureControlDialog
                    ],
                    exports: [
                        AswSignature,
                        AswSignatureDialog,
                        AswSignatureControlDialog
                    ]
                }]
        }] });

/**
 * @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 { AswSignature, AswSignatureControlDialog, AswSignatureDialog, AswSignatureModule };
//# sourceMappingURL=asoftwareworld-form-builder-form-control-signature.mjs.map
