/**
 * @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 { FormBuilder, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Constants, Icons } from '@asoftwareworld/form-builder-pro/common';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@angular/material/dialog";
import * as i3 from "@angular/common";
import * as i4 from "@angular/material/core";
import * as i5 from "@angular/material/button";
import * as i6 from "@angular/material/divider";
import * as i7 from "@angular/material/input";
import * as i8 from "@angular/material/form-field";
import * as i9 from "@angular/material/select";
import * as i10 from "@angular/material/tooltip";
import * as i11 from "@asoftwareworld/form-builder-pro/core";
import * as i12 from "@asoftwareworld/form-builder-pro/common";
export class AswButtonDialog {
    formBuilder;
    dialogRef;
    data;
    constants = Constants;
    icons = Icons;
    aswEditButtonForm;
    status;
    control;
    constructor(formBuilder, dialogRef, data) {
        this.formBuilder = formBuilder;
        this.dialogRef = dialogRef;
        this.data = data;
    }
    ngOnInit() {
        this.control = this.data.control;
        this.validateFormBuilder();
        this.editProperty(this.control);
    }
    validateFormBuilder() {
        this.aswEditButtonForm = this.formBuilder.group({
            id: ['', [Validators.required]],
            customClass: [],
            tooltip: ['', [Validators.required]],
            label: ['', [Validators.required, Validators.minLength(2)]],
            type: ['', [Validators.required]],
            color: [],
            style: ['', [Validators.required]]
        });
    }
    editProperty(control) {
        this.aswEditButtonForm.setValue({
            id: control.id,
            customClass: control.customClass ?? '',
            tooltip: control.tooltip,
            label: control.label,
            type: control.type,
            color: control.color,
            style: control.style
        });
    }
    onNoClick() {
        this.dialogRef.close();
    }
    onSubmit() {
        if (this.aswEditButtonForm.invalid) {
            return;
        }
        this.aswEditButtonForm.value.controlType = this.control.controlType;
        this.aswEditButtonForm.value.guid = this.control.guid;
        this.dialogRef.close(this.aswEditButtonForm.value);
    }
    onChange(event) {
        if (event.checked) {
            this.status = true;
        }
        else {
            this.status = false;
        }
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswButtonDialog, deps: [{ token: i1.FormBuilder }, { token: i2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: AswButtonDialog, selector: "asw-button-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.Edit' | aswTranslate}} {{control.label}}</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<form [formGroup]=\"aswEditButtonForm\" (ngSubmit)=\"onSubmit()\">\r\n    <mat-dialog-content class=\"mat-typography\">\r\n        <ng-container *ngIf=\"data.CSSFramework === 'material'; else bootstrap\">\r\n            <div class=\"asw-row\">\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('uniqueId')\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.UniqueId' | aswTranslate}}</mat-label>\r\n                            <input matInput type=\"text\"\r\n                                name=\"id\"\r\n                                placeholder=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                matTooltip=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                formControlName=\"id\" required>\r\n                            <mat-error *ngFor=\"let validation of constants.accountValidationMessages.id\">\r\n                                <ng-container *ngIf=\"aswEditButtonForm.get('id')?.hasError(validation.type) && (aswEditButtonForm.get('id')?.dirty || aswEditButtonForm.get('id')?.touched)\">\r\n                                    {{validation.message | aswTranslate}}\r\n                                </ng-container>\r\n                            </mat-error>\r\n                        </mat-form-field>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Label' | aswTranslate}}</mat-label>\r\n                        <input matInput type=\"text\"\r\n                            placeholder=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            formControlName=\"label\" required>\r\n                        <mat-error *ngFor=\"let validation of constants.accountValidationMessages.label\">\r\n                            <ng-container *ngIf=\"aswEditButtonForm.get('label')?.hasError(validation.type) && (aswEditButtonForm.get('label')?.dirty || aswEditButtonForm.get('label')?.touched)\">\r\n                                {{validation.message | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </div>\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.CustomCSSClass' | aswTranslate}}</mat-label>\r\n                            <input matInput type=\"text\"\r\n                                name=\"customClass\"\r\n                                placeholder=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                formControlName=\"customClass\">\r\n                        </mat-form-field>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Tooltip' | aswTranslate}}</mat-label>\r\n                        <input matInput type=\"text\"\r\n                            placeholder=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            formControlName=\"tooltip\">\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-12\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Color' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"color\" matTooltip=\"{{'FormControl.SelectColor' | aswTranslate}}\">\r\n                            <mat-option value=\"\">Basic</mat-option>\r\n                            <mat-option value=\"primary\">Primary</mat-option>\r\n                            <mat-option value=\"accent\">Rose</mat-option>\r\n                            <mat-option value=\"warn\">Danger</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Type' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"type\" matTooltip=\"{{'FormControl.SelectType' | aswTranslate}}\">\r\n                            <mat-option value=\"button\">Button</mat-option>\r\n                            <mat-option value=\"submit\">Submit</mat-option>\r\n                            <mat-option value=\"reset\">Reset</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Style' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"style\" matTooltip=\"{{'FormControl.SelectStyle' | aswTranslate}}\">\r\n                            <mat-option value=\"mat-button\">Basic</mat-option>\r\n                            <mat-option value=\"mat-raised-button\">Raised</mat-option>\r\n                            <mat-option value=\"mat-stroked-button\">Stroked</mat-option>\r\n                            <mat-option value=\"mat-flat-button\">Flat</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n            </div>\r\n        </ng-container>\r\n        <ng-template #bootstrap>\r\n            <div class=\"asw-row\">\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('uniqueId')\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label asw-invalid-label {{(aswEditButtonForm.get('id')?.invalid && (aswEditButtonForm.get('id')?.dirty || aswEditButtonForm.get('id')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.UniqueId' | aswTranslate}}</label>\r\n                            <input type=\"text\"\r\n                                name=\"id\"\r\n                                class=\"asw-input-control\"\r\n                                [class.asw-is-invalid]=\"(aswEditButtonForm.get('id')?.invalid && (aswEditButtonForm.get('id')?.dirty || aswEditButtonForm.get('id')?.touched))\"\r\n                                matTooltip=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                formControlName=\"id\" required>\r\n                            <div *ngFor=\"let validation of constants.accountValidationMessages.id\" class=\"invalid-feedback\">\r\n                                <ng-container *ngIf=\"aswEditButtonForm.get('id')?.hasError(validation.type) && (aswEditButtonForm.get('id')?.dirty || aswEditButtonForm.get('id')?.touched)\">\r\n                                    {{validation.message | aswTranslate}}\r\n                                </ng-container>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>                \r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label asw-invalid-label {{(aswEditButtonForm.get('label')?.invalid && (aswEditButtonForm.get('label')?.dirty || aswEditButtonForm.get('label')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Label' | aswTranslate}}</label>\r\n                        <input type=\"text\"\r\n                            class=\"asw-input-control\"\r\n                            [class.asw-is-invalid]=\"(aswEditButtonForm.get('label')?.invalid && (aswEditButtonForm.get('label')?.dirty || aswEditButtonForm.get('label')?.touched))\"\r\n                            matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            formControlName=\"label\" required>\r\n                        <div *ngFor=\"let validation of constants.accountValidationMessages.label\" class=\"invalid-feedback\">\r\n                            <ng-container *ngIf=\"aswEditButtonForm.get('label')?.hasError(validation.type) && (aswEditButtonForm.get('label')?.dirty || aswEditButtonForm.get('label')?.touched)\">\r\n                                {{validation.message | aswTranslate}}\r\n                            </ng-container>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label\">{{'FormControl.CustomCSSClass' | aswTranslate}}</label>\r\n                            <input type=\"text\"\r\n                                name=\"customClass\"\r\n                                class=\"asw-input-control\"\r\n                                matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                formControlName=\"customClass\">\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Tooltip' | aswTranslate}}</label>\r\n                        <input type=\"text\"\r\n                            class=\"asw-input-control\"\r\n                            matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            formControlName=\"tooltip\">\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Type' | aswTranslate}}</label>\r\n                        <select formControlName=\"type\" class=\"asw-select\" matTooltip=\"{{'FormControl.SelectType' | aswTranslate}}\">\r\n                            <option value=\"button\">Button</option>\r\n                            <option value=\"submit\">Submit</option>\r\n                            <option value=\"reset\">Reset</option>\r\n                        </select>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Color' | aswTranslate}}</label>\r\n                        <select formControlName=\"color\" class=\"asw-select\" matTooltip=\"{{'FormControl.SelectColor' | aswTranslate}}\">\r\n                            <option value=\"primary\">Primary</option>\r\n                            <option value=\"secondary\">Secondary</option>\r\n                            <option value=\"success\">Success</option>\r\n                            <option value=\"danger\">Danger</option>\r\n                            <option value=\"warning\">Warning</option>\r\n                            <option value=\"info\">Info</option>\r\n                            <option value=\"light\">Light</option>\r\n                            <option value=\"dark\">Dark</option>\r\n                            <option value=\"link\">Link</option>\r\n                        </select>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </ng-template>\r\n    </mat-dialog-content>\r\n    <mat-divider></mat-divider>\r\n    <mat-dialog-actions align=\"end\">\r\n        <button type=\"button\"\r\n                class=\"asw-button asw-button-danger asw-mb-1 asw-me-2\"\r\n                (click)=\"onNoClick()\">\r\n            {{'FormControl.No' | aswTranslate}}\r\n        </button>\r\n        <button type=\"submit\"\r\n                class=\"asw-button asw-button-primary asw-mb-1\"\r\n                cdkFocusInitial>\r\n            {{'FormControl.Yes' | aswTranslate}}\r\n        </button>\r\n    </mat-dialog-actions>\r\n</form>\r\n\r\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", 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]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i6.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i7.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"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i9.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i11.AswTranslatePipe, name: "aswTranslate" }, { kind: "pipe", type: i12.AswSafeHtmlPipe, name: "aswSafeHtml" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswButtonDialog, decorators: [{
            type: Component,
            args: [{ selector: 'asw-button-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.Edit' | aswTranslate}} {{control.label}}</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<form [formGroup]=\"aswEditButtonForm\" (ngSubmit)=\"onSubmit()\">\r\n    <mat-dialog-content class=\"mat-typography\">\r\n        <ng-container *ngIf=\"data.CSSFramework === 'material'; else bootstrap\">\r\n            <div class=\"asw-row\">\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('uniqueId')\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.UniqueId' | aswTranslate}}</mat-label>\r\n                            <input matInput type=\"text\"\r\n                                name=\"id\"\r\n                                placeholder=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                matTooltip=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                formControlName=\"id\" required>\r\n                            <mat-error *ngFor=\"let validation of constants.accountValidationMessages.id\">\r\n                                <ng-container *ngIf=\"aswEditButtonForm.get('id')?.hasError(validation.type) && (aswEditButtonForm.get('id')?.dirty || aswEditButtonForm.get('id')?.touched)\">\r\n                                    {{validation.message | aswTranslate}}\r\n                                </ng-container>\r\n                            </mat-error>\r\n                        </mat-form-field>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Label' | aswTranslate}}</mat-label>\r\n                        <input matInput type=\"text\"\r\n                            placeholder=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            formControlName=\"label\" required>\r\n                        <mat-error *ngFor=\"let validation of constants.accountValidationMessages.label\">\r\n                            <ng-container *ngIf=\"aswEditButtonForm.get('label')?.hasError(validation.type) && (aswEditButtonForm.get('label')?.dirty || aswEditButtonForm.get('label')?.touched)\">\r\n                                {{validation.message | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </div>\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.CustomCSSClass' | aswTranslate}}</mat-label>\r\n                            <input matInput type=\"text\"\r\n                                name=\"customClass\"\r\n                                placeholder=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                formControlName=\"customClass\">\r\n                        </mat-form-field>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Tooltip' | aswTranslate}}</mat-label>\r\n                        <input matInput type=\"text\"\r\n                            placeholder=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            formControlName=\"tooltip\">\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-12\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Color' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"color\" matTooltip=\"{{'FormControl.SelectColor' | aswTranslate}}\">\r\n                            <mat-option value=\"\">Basic</mat-option>\r\n                            <mat-option value=\"primary\">Primary</mat-option>\r\n                            <mat-option value=\"accent\">Rose</mat-option>\r\n                            <mat-option value=\"warn\">Danger</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Type' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"type\" matTooltip=\"{{'FormControl.SelectType' | aswTranslate}}\">\r\n                            <mat-option value=\"button\">Button</mat-option>\r\n                            <mat-option value=\"submit\">Submit</mat-option>\r\n                            <mat-option value=\"reset\">Reset</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Style' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"style\" matTooltip=\"{{'FormControl.SelectStyle' | aswTranslate}}\">\r\n                            <mat-option value=\"mat-button\">Basic</mat-option>\r\n                            <mat-option value=\"mat-raised-button\">Raised</mat-option>\r\n                            <mat-option value=\"mat-stroked-button\">Stroked</mat-option>\r\n                            <mat-option value=\"mat-flat-button\">Flat</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n            </div>\r\n        </ng-container>\r\n        <ng-template #bootstrap>\r\n            <div class=\"asw-row\">\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('uniqueId')\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label asw-invalid-label {{(aswEditButtonForm.get('id')?.invalid && (aswEditButtonForm.get('id')?.dirty || aswEditButtonForm.get('id')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.UniqueId' | aswTranslate}}</label>\r\n                            <input type=\"text\"\r\n                                name=\"id\"\r\n                                class=\"asw-input-control\"\r\n                                [class.asw-is-invalid]=\"(aswEditButtonForm.get('id')?.invalid && (aswEditButtonForm.get('id')?.dirty || aswEditButtonForm.get('id')?.touched))\"\r\n                                matTooltip=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                formControlName=\"id\" required>\r\n                            <div *ngFor=\"let validation of constants.accountValidationMessages.id\" class=\"invalid-feedback\">\r\n                                <ng-container *ngIf=\"aswEditButtonForm.get('id')?.hasError(validation.type) && (aswEditButtonForm.get('id')?.dirty || aswEditButtonForm.get('id')?.touched)\">\r\n                                    {{validation.message | aswTranslate}}\r\n                                </ng-container>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>                \r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label asw-invalid-label {{(aswEditButtonForm.get('label')?.invalid && (aswEditButtonForm.get('label')?.dirty || aswEditButtonForm.get('label')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Label' | aswTranslate}}</label>\r\n                        <input type=\"text\"\r\n                            class=\"asw-input-control\"\r\n                            [class.asw-is-invalid]=\"(aswEditButtonForm.get('label')?.invalid && (aswEditButtonForm.get('label')?.dirty || aswEditButtonForm.get('label')?.touched))\"\r\n                            matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            formControlName=\"label\" required>\r\n                        <div *ngFor=\"let validation of constants.accountValidationMessages.label\" class=\"invalid-feedback\">\r\n                            <ng-container *ngIf=\"aswEditButtonForm.get('label')?.hasError(validation.type) && (aswEditButtonForm.get('label')?.dirty || aswEditButtonForm.get('label')?.touched)\">\r\n                                {{validation.message | aswTranslate}}\r\n                            </ng-container>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label\">{{'FormControl.CustomCSSClass' | aswTranslate}}</label>\r\n                            <input type=\"text\"\r\n                                name=\"customClass\"\r\n                                class=\"asw-input-control\"\r\n                                matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                formControlName=\"customClass\">\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Tooltip' | aswTranslate}}</label>\r\n                        <input type=\"text\"\r\n                            class=\"asw-input-control\"\r\n                            matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            formControlName=\"tooltip\">\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Type' | aswTranslate}}</label>\r\n                        <select formControlName=\"type\" class=\"asw-select\" matTooltip=\"{{'FormControl.SelectType' | aswTranslate}}\">\r\n                            <option value=\"button\">Button</option>\r\n                            <option value=\"submit\">Submit</option>\r\n                            <option value=\"reset\">Reset</option>\r\n                        </select>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Color' | aswTranslate}}</label>\r\n                        <select formControlName=\"color\" class=\"asw-select\" matTooltip=\"{{'FormControl.SelectColor' | aswTranslate}}\">\r\n                            <option value=\"primary\">Primary</option>\r\n                            <option value=\"secondary\">Secondary</option>\r\n                            <option value=\"success\">Success</option>\r\n                            <option value=\"danger\">Danger</option>\r\n                            <option value=\"warning\">Warning</option>\r\n                            <option value=\"info\">Info</option>\r\n                            <option value=\"light\">Light</option>\r\n                            <option value=\"dark\">Dark</option>\r\n                            <option value=\"link\">Link</option>\r\n                        </select>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </ng-template>\r\n    </mat-dialog-content>\r\n    <mat-divider></mat-divider>\r\n    <mat-dialog-actions align=\"end\">\r\n        <button type=\"button\"\r\n                class=\"asw-button asw-button-danger asw-mb-1 asw-me-2\"\r\n                (click)=\"onNoClick()\">\r\n            {{'FormControl.No' | aswTranslate}}\r\n        </button>\r\n        <button type=\"submit\"\r\n                class=\"asw-button asw-button-primary asw-mb-1\"\r\n                cdkFocusInitial>\r\n            {{'FormControl.Yes' | aswTranslate}}\r\n        </button>\r\n    </mat-dialog-actions>\r\n</form>\r\n\r\n" }]
        }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i2.MatDialogRef }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }]; } });
//# sourceMappingURL=data:application/json;base64, 