/**
 * @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 { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Icons } from '@asoftwareworld/form-builder-pro/common';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "@angular/forms";
import * as i3 from "@angular/material/form-field";
import * as i4 from "@angular/material/button";
import * as i5 from "@angular/material/input";
import * as i6 from "@angular/material/tooltip";
import * as i7 from "@angular/material/divider";
import * as i8 from "@asoftwareworld/form-builder-pro/common";
export class AswEditorDialog {
    dialogRef;
    data;
    icons = Icons;
    linkTo;
    constructor(dialogRef, data) {
        this.dialogRef = dialogRef;
        this.data = data;
    }
    ngOnInit() {
        this.linkTo = this.data.linkTo;
    }
    onNoClick() {
        this.dialogRef.close();
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswEditorDialog, 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: AswEditorDialog, selector: "asw-editor-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\">Add Link</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\">add</div>\r\n    </button>\r\n</div>\r\n<mat-divider></mat-divider>\r\n<div mat-dialog-content class=\"mat-typography\">\r\n    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n        <mat-label>Link to</mat-label>\r\n        <input matInput \r\n            type=\"text\"\r\n            placeholder=\"Link to\"\r\n            matTooltip=\"Link to\"\r\n            #input=\"ngModel\"\r\n            [(ngModel)]=\"linkTo\">\r\n    </mat-form-field>\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-danger asw-mb-1 asw-me-2\"\r\n            (click)=\"onNoClick()\">\r\n        Cancel\r\n    </button>\r\n    <button type=\"button\"\r\n            id=\"yes\"\r\n            class=\"asw-button asw-button-primary asw-mb-1\"\r\n            [mat-dialog-close]=\"linkTo\"\r\n            cdkFocusInitial>\r\n        Ok\r\n    </button>\r\n</div>", dependencies: [{ kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.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: "directive", type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i7.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "pipe", type: i8.AswSafeHtmlPipe, name: "aswSafeHtml" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswEditorDialog, decorators: [{
            type: Component,
            args: [{ selector: 'asw-editor-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\">Add Link</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\">add</div>\r\n    </button>\r\n</div>\r\n<mat-divider></mat-divider>\r\n<div mat-dialog-content class=\"mat-typography\">\r\n    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n        <mat-label>Link to</mat-label>\r\n        <input matInput \r\n            type=\"text\"\r\n            placeholder=\"Link to\"\r\n            matTooltip=\"Link to\"\r\n            #input=\"ngModel\"\r\n            [(ngModel)]=\"linkTo\">\r\n    </mat-form-field>\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-danger asw-mb-1 asw-me-2\"\r\n            (click)=\"onNoClick()\">\r\n        Cancel\r\n    </button>\r\n    <button type=\"button\"\r\n            id=\"yes\"\r\n            class=\"asw-button asw-button-primary asw-mb-1\"\r\n            [mat-dialog-close]=\"linkTo\"\r\n            cdkFocusInitial>\r\n        Ok\r\n    </button>\r\n</div>" }]
        }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }]; } });
//# sourceMappingURL=data:application/json;base64, 