/**
 * @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 { moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
import { Component, EventEmitter, Output } from '@angular/core';
import { Constants } from '@asoftwareworld/form-builder/form-control/core';
import { AswJsonPreviewDialog } from '@asoftwareworld/form-builder/form-control/json-preview-dialog';
import { CONTROLS } from './default-controls';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "@angular/material/icon";
import * as i3 from "@asoftwareworld/form-builder/form-control/autocomplete";
import * as i4 from "@asoftwareworld/form-builder/form-control/header";
import * as i5 from "@asoftwareworld/form-builder/form-control/image";
import * as i6 from "@asoftwareworld/form-builder/form-control/textbox";
import * as i7 from "@asoftwareworld/form-builder/form-control/textarea";
import * as i8 from "@asoftwareworld/form-builder/form-control/select";
import * as i9 from "@asoftwareworld/form-builder/form-control/multi-select";
import * as i10 from "@asoftwareworld/form-builder/form-control/radio-button";
import * as i11 from "@asoftwareworld/form-builder/form-control/checkbox";
import * as i12 from "@asoftwareworld/form-builder/form-control/datepicker";
import * as i13 from "@asoftwareworld/form-builder/form-control/button";
import * as i14 from "@asoftwareworld/form-builder/form-control/paragraph";
import * as i15 from "@asoftwareworld/form-builder/form-control/divider";
import * as i16 from "@asoftwareworld/form-builder/form-control/slide-toggle";
import * as i17 from "@asoftwareworld/form-builder/form-control/gps";
import * as i18 from "@asoftwareworld/form-builder/form-control/signature";
import * as i19 from "@asoftwareworld/form-builder/form-control/drawing";
import * as i20 from "@angular/cdk/drag-drop";
import * as i21 from "@angular/common";
export class AswFormBuilder {
    constructor(dialog) {
        this.dialog = dialog;
        this.constants = Constants;
        this.availableControls = [];
        this.formContainer = [];
        this.previewClick = new EventEmitter();
        this.publishClick = new EventEmitter();
    }
    ngOnInit() {
        this.availableControls = CONTROLS;
    }
    drop(event) {
        if (event.previousContainer === event.container) {
            moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
        }
        else {
            transferArrayItem(JSON.parse(JSON.stringify(event.previousContainer.data)), event.container.data, event.previousIndex, event.currentIndex);
        }
    }
    updatedControl(data) {
        this.formContainer.splice(data.index, 1, data.control);
    }
    deleteControl(index) {
        this.formContainer.splice(index, 1);
    }
    previewTemplate() {
        this.previewClick.emit(this.formContainer);
    }
    previewJsonData() {
        const dialogRef = this.dialog.open(AswJsonPreviewDialog, {
            disableClose: true,
            width: '744px',
            data: this.formContainer
        });
        dialogRef.afterClosed();
    }
    publishTemplate() {
        this.publishClick.emit(this.formContainer);
    }
}
AswFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AswFormBuilder, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
AswFormBuilder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: AswFormBuilder, selector: "asw-form-builder", outputs: { previewClick: "previewClick", publishClick: "publishClick" }, ngImport: i0, template: "<div class=\"row\">\r\n    <div class=\"col-md-12 text-right\">\r\n        <button type=\"button\"\r\n                class=\"btn btn-primary btn-sm mr-1\"\r\n                (click)=\"previewTemplate()\">Preview</button>\r\n        <button type=\"button\" \r\n                class=\"btn btn-secondary btn-sm mr-1\"\r\n                (click)=\"previewJsonData()\">Json Data</button>\r\n        <button class=\"btn btn-success btn-sm\"\r\n                type=\"button\" \r\n                (click)=\"publishTemplate()\">Publish</button>\r\n    </div>\r\n</div>\r\n<div class=\"row\" cdkDropListGroup>\r\n    <div class=\"col-md-3\">\r\n        <div class=\"card\">\r\n            <div class=\"card-body\">\r\n                <h4 class=\"card-title mb-3\">Controls</h4>\r\n                <div cdkDropList\r\n                    [cdkDropListData]=\"availableControls\"\r\n                    class=\"asw-list\">\r\n                    <div class=\"asw-box\" *ngFor=\"let item of availableControls\" cdkDrag>\r\n                        <mat-icon aria-hidden=\"false\">{{item.icon}}</mat-icon>\r\n                        {{item.displayName}}\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div class=\"col-md-9\">\r\n        <div class=\"card\">            \r\n            <div class=\"card-body\">\r\n                <h4 class=\"card-title mb-3\">Drop Area</h4>\r\n                <div\r\n                    cdkDropList\r\n                    [cdkDropListData]=\"formContainer\"\r\n                    class=\"asw-list\"\r\n                    (cdkDropListDropped)=\"drop($event)\">\r\n                    <div *ngFor=\"let control of formContainer; let i = index\" class=\"asw-box\" cdkDrag>\r\n                        <ng-container [ngSwitch]=\"control.controlType\" class=\"asw-full-width\">\r\n                            <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n                                <asw-autocomplete [control]=\"control\"\r\n                                                    [controlIndex]=\"i\"\r\n                                                    [isPreviewTemplate]=\"true\"\r\n                                                    (autocompleteUpdateEvent)=\"updatedControl($event)\"\r\n                                                    (autocompleteDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-autocomplete>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'header'\">\r\n                                <asw-header [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (headerUpdateEvent)=\"updatedControl($event)\"\r\n                                            (headerDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-header>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'image'\">\r\n                                <asw-image [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (imageUpdateEvent)=\"updatedControl($event)\"\r\n                                            (imageDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-image>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'textbox'\">\r\n                                <asw-textbox [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (textboxUpdateEvent)=\"updatedControl($event)\"\r\n                                            (textboxDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-textbox>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'textarea'\">\r\n                                <asw-textarea [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (textAreaUpdateEvent)=\"updatedControl($event)\"\r\n                                                (textAreaDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-textarea>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'select'\">\r\n                                <asw-select [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (selectUpdateEvent)=\"updatedControl($event)\"\r\n                                            (selectDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-select>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'multi-select'\">\r\n                                <asw-multi-select [control]=\"control\"\r\n                                                    [controlIndex]=\"i\"\r\n                                                    [isPreviewTemplate]=\"true\"\r\n                                                    (multiSelectUpdateEvent)=\"updatedControl($event)\"\r\n                                                    (multiSelectDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-multi-select>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'radio'\">\r\n                                <asw-radio-button [control]=\"control\"\r\n                                                    [controlIndex]=\"i\"\r\n                                                    [isPreviewTemplate]=\"true\"\r\n                                                    (radioButtonUpdateEvent)=\"updatedControl($event)\"\r\n                                                    (radioButtonDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-radio-button>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'checkbox'\">\r\n                                <asw-checkbox [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (checkboxUpdateEvent)=\"updatedControl($event)\"\r\n                                                (checkboxDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-checkbox>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'datepicker'\">\r\n                                <asw-datepicker [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (datepickerUpdateEvent)=\"updatedControl($event)\"\r\n                                                (datepickerDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-datepicker>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'button'\">\r\n                                <asw-button [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (buttonUpdateEvent)=\"updatedControl($event)\"\r\n                                            (buttonDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-button>                                       \r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'paragraph'\">\r\n                                <asw-paragraph [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (paragraphUpdateEvent)=\"updatedControl($event)\"\r\n                                            (paragraphDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-paragraph>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'divider'\">\r\n                                <asw-divider [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (dividerDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-divider>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'slide-toggle'\">\r\n                                <asw-slide-toggle [control]=\"control\"\r\n                                                    [controlIndex]=\"i\"\r\n                                                    [isPreviewTemplate]=\"true\"\r\n                                                    (slidetoggleUpdateEvent)=\"updatedControl($event)\"\r\n                                                    (slidetoggleDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-slide-toggle>                                       \r\n                            </ng-container> \r\n                            <ng-container *ngSwitchCase=\"'gps'\">\r\n                                <asw-gps [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (gpsUpdateEvent)=\"updatedControl($event)\"\r\n                                            (gpsDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-gps>                                       \r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'signature'\">\r\n                                <asw-signature [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (signatureUpdateEvent)=\"updatedControl($event)\"\r\n                                                (signatureDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-signature>                                       \r\n                            </ng-container>    \r\n                            <ng-container *ngSwitchCase=\"'drawing'\">\r\n                                <asw-drawing [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (drawingUpdateEvent)=\"updatedControl($event)\"\r\n                                                (drawingDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-drawing>                                       \r\n                            </ng-container>                                    \r\n                        </ng-container>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>", styles: [".asw-list{border:solid 1px #ccc;min-height:630px;background:white;border-radius:4px;overflow:hidden;display:block}.asw-box{padding:7px;border-bottom:solid 1px #ccc;color:#000000de;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:white;font-size:14px}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.asw-box:last-child{border:none}.asw-list.cdk-drop-list-dragging .asw-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.asw-horizontal-list{width:1000px;max-width:100%;border:solid 1px #ccc;min-height:60px;display:flex;flex-direction:row;background:white;border-radius:4px;overflow:hidden}.asw-horizontal-box{padding:20px 10px;border-right:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:white;font-size:14px;flex-grow:1;flex-basis:0}.mat-form-field{display:block!important}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.AswAutocomplete, selector: "asw-autocomplete", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["autocompleteUpdateEvent", "autocompleteDeleteEvent"] }, { type: i4.AswHeader, selector: "asw-header", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["headerUpdateEvent", "headerDeleteEvent"] }, { type: i5.AswImage, selector: "asw-image", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["imageUpdateEvent", "imageDeleteEvent"] }, { type: i6.AswTextbox, selector: "asw-textbox", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["textboxUpdateEvent", "textboxDeleteEvent"] }, { type: i7.AswTextarea, selector: "asw-textarea", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["textAreaUpdateEvent", "textAreaDeleteEvent"] }, { type: i8.AswSelect, selector: "asw-select", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["selectUpdateEvent", "selectDeleteEvent"] }, { type: i9.AswMultiSelect, selector: "asw-multi-select", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["multiSelectUpdateEvent", "multiSelectDeleteEvent"] }, { type: i10.AswRadioButton, selector: "asw-radio-button", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["radioButtonUpdateEvent", "radioButtonDeleteEvent"] }, { type: i11.AswCheckbox, selector: "asw-checkbox", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["checkboxUpdateEvent", "checkboxDeleteEvent"] }, { type: i12.AswDatepicker, selector: "asw-datepicker", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["datepickerUpdateEvent", "datepickerDeleteEvent"] }, { type: i13.AswButton, selector: "asw-button", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["buttonUpdateEvent", "buttonDeleteEvent"] }, { type: i14.AswParagraph, selector: "asw-paragraph", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["paragraphUpdateEvent", "paragraphDeleteEvent"] }, { type: i15.AswDivider, selector: "asw-divider", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["dividerDeleteEvent"] }, { type: i16.AswSlideToggle, selector: "asw-slide-toggle", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["slidetoggleUpdateEvent", "slidetoggleDeleteEvent"] }, { type: i17.AswGps, selector: "asw-gps", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["gpsUpdateEvent", "gpsDeleteEvent"] }, { type: i18.AswSignature, selector: "asw-signature", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["signatureUpdateEvent", "signatureDeleteEvent"] }, { type: i19.AswDrawing, selector: "asw-drawing", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["drawingUpdateEvent", "drawingDeleteEvent"] }], directives: [{ type: i20.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { type: i20.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i21.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i20.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i21.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i21.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AswFormBuilder, decorators: [{
            type: Component,
            args: [{ selector: 'asw-form-builder', template: "<div class=\"row\">\r\n    <div class=\"col-md-12 text-right\">\r\n        <button type=\"button\"\r\n                class=\"btn btn-primary btn-sm mr-1\"\r\n                (click)=\"previewTemplate()\">Preview</button>\r\n        <button type=\"button\" \r\n                class=\"btn btn-secondary btn-sm mr-1\"\r\n                (click)=\"previewJsonData()\">Json Data</button>\r\n        <button class=\"btn btn-success btn-sm\"\r\n                type=\"button\" \r\n                (click)=\"publishTemplate()\">Publish</button>\r\n    </div>\r\n</div>\r\n<div class=\"row\" cdkDropListGroup>\r\n    <div class=\"col-md-3\">\r\n        <div class=\"card\">\r\n            <div class=\"card-body\">\r\n                <h4 class=\"card-title mb-3\">Controls</h4>\r\n                <div cdkDropList\r\n                    [cdkDropListData]=\"availableControls\"\r\n                    class=\"asw-list\">\r\n                    <div class=\"asw-box\" *ngFor=\"let item of availableControls\" cdkDrag>\r\n                        <mat-icon aria-hidden=\"false\">{{item.icon}}</mat-icon>\r\n                        {{item.displayName}}\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div class=\"col-md-9\">\r\n        <div class=\"card\">            \r\n            <div class=\"card-body\">\r\n                <h4 class=\"card-title mb-3\">Drop Area</h4>\r\n                <div\r\n                    cdkDropList\r\n                    [cdkDropListData]=\"formContainer\"\r\n                    class=\"asw-list\"\r\n                    (cdkDropListDropped)=\"drop($event)\">\r\n                    <div *ngFor=\"let control of formContainer; let i = index\" class=\"asw-box\" cdkDrag>\r\n                        <ng-container [ngSwitch]=\"control.controlType\" class=\"asw-full-width\">\r\n                            <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n                                <asw-autocomplete [control]=\"control\"\r\n                                                    [controlIndex]=\"i\"\r\n                                                    [isPreviewTemplate]=\"true\"\r\n                                                    (autocompleteUpdateEvent)=\"updatedControl($event)\"\r\n                                                    (autocompleteDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-autocomplete>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'header'\">\r\n                                <asw-header [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (headerUpdateEvent)=\"updatedControl($event)\"\r\n                                            (headerDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-header>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'image'\">\r\n                                <asw-image [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (imageUpdateEvent)=\"updatedControl($event)\"\r\n                                            (imageDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-image>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'textbox'\">\r\n                                <asw-textbox [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (textboxUpdateEvent)=\"updatedControl($event)\"\r\n                                            (textboxDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-textbox>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'textarea'\">\r\n                                <asw-textarea [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (textAreaUpdateEvent)=\"updatedControl($event)\"\r\n                                                (textAreaDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-textarea>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'select'\">\r\n                                <asw-select [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (selectUpdateEvent)=\"updatedControl($event)\"\r\n                                            (selectDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-select>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'multi-select'\">\r\n                                <asw-multi-select [control]=\"control\"\r\n                                                    [controlIndex]=\"i\"\r\n                                                    [isPreviewTemplate]=\"true\"\r\n                                                    (multiSelectUpdateEvent)=\"updatedControl($event)\"\r\n                                                    (multiSelectDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-multi-select>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'radio'\">\r\n                                <asw-radio-button [control]=\"control\"\r\n                                                    [controlIndex]=\"i\"\r\n                                                    [isPreviewTemplate]=\"true\"\r\n                                                    (radioButtonUpdateEvent)=\"updatedControl($event)\"\r\n                                                    (radioButtonDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-radio-button>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'checkbox'\">\r\n                                <asw-checkbox [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (checkboxUpdateEvent)=\"updatedControl($event)\"\r\n                                                (checkboxDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-checkbox>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'datepicker'\">\r\n                                <asw-datepicker [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (datepickerUpdateEvent)=\"updatedControl($event)\"\r\n                                                (datepickerDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-datepicker>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'button'\">\r\n                                <asw-button [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (buttonUpdateEvent)=\"updatedControl($event)\"\r\n                                            (buttonDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-button>                                       \r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'paragraph'\">\r\n                                <asw-paragraph [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (paragraphUpdateEvent)=\"updatedControl($event)\"\r\n                                            (paragraphDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-paragraph>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'divider'\">\r\n                                <asw-divider [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (dividerDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-divider>\r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'slide-toggle'\">\r\n                                <asw-slide-toggle [control]=\"control\"\r\n                                                    [controlIndex]=\"i\"\r\n                                                    [isPreviewTemplate]=\"true\"\r\n                                                    (slidetoggleUpdateEvent)=\"updatedControl($event)\"\r\n                                                    (slidetoggleDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-slide-toggle>                                       \r\n                            </ng-container> \r\n                            <ng-container *ngSwitchCase=\"'gps'\">\r\n                                <asw-gps [control]=\"control\"\r\n                                            [controlIndex]=\"i\"\r\n                                            [isPreviewTemplate]=\"true\"\r\n                                            (gpsUpdateEvent)=\"updatedControl($event)\"\r\n                                            (gpsDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-gps>                                       \r\n                            </ng-container>\r\n                            <ng-container *ngSwitchCase=\"'signature'\">\r\n                                <asw-signature [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (signatureUpdateEvent)=\"updatedControl($event)\"\r\n                                                (signatureDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-signature>                                       \r\n                            </ng-container>    \r\n                            <ng-container *ngSwitchCase=\"'drawing'\">\r\n                                <asw-drawing [control]=\"control\"\r\n                                                [controlIndex]=\"i\"\r\n                                                [isPreviewTemplate]=\"true\"\r\n                                                (drawingUpdateEvent)=\"updatedControl($event)\"\r\n                                                (drawingDeleteEvent)=\"deleteControl($event)\">\r\n                                </asw-drawing>                                       \r\n                            </ng-container>                                    \r\n                        </ng-container>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>", styles: [".asw-list{border:solid 1px #ccc;min-height:630px;background:white;border-radius:4px;overflow:hidden;display:block}.asw-box{padding:7px;border-bottom:solid 1px #ccc;color:#000000de;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:white;font-size:14px}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.asw-box:last-child{border:none}.asw-list.cdk-drop-list-dragging .asw-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.asw-horizontal-list{width:1000px;max-width:100%;border:solid 1px #ccc;min-height:60px;display:flex;flex-direction:row;background:white;border-radius:4px;overflow:hidden}.asw-horizontal-box{padding:20px 10px;border-right:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:white;font-size:14px;flex-grow:1;flex-basis:0}.mat-form-field{display:block!important}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { previewClick: [{
                type: Output
            }], publishClick: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 