/**
 * @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, Input } from '@angular/core';
import { Constants } from '@asoftwareworld/form-builder/form-control/core';
import * as i0 from "@angular/core";
import * as i1 from "@asoftwareworld/form-builder/form-control/autocomplete";
import * as i2 from "@asoftwareworld/form-builder/form-control/header";
import * as i3 from "@asoftwareworld/form-builder/form-control/image";
import * as i4 from "@asoftwareworld/form-builder/form-control/textbox";
import * as i5 from "@asoftwareworld/form-builder/form-control/textarea";
import * as i6 from "@asoftwareworld/form-builder/form-control/select";
import * as i7 from "@asoftwareworld/form-builder/form-control/multi-select";
import * as i8 from "@asoftwareworld/form-builder/form-control/radio-button";
import * as i9 from "@asoftwareworld/form-builder/form-control/checkbox";
import * as i10 from "@asoftwareworld/form-builder/form-control/datepicker";
import * as i11 from "@asoftwareworld/form-builder/form-control/button";
import * as i12 from "@asoftwareworld/form-builder/form-control/paragraph";
import * as i13 from "@asoftwareworld/form-builder/form-control/divider";
import * as i14 from "@asoftwareworld/form-builder/form-control/slide-toggle";
import * as i15 from "@asoftwareworld/form-builder/form-control/gps";
import * as i16 from "@angular/common";
export class AswPreviewTemplate {
    constructor() {
        this.constants = Constants;
        this.formContainer = [];
    }
    updatedControl(data) {
        this.formContainer.splice(data.index, 1, data.control);
    }
}
AswPreviewTemplate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswPreviewTemplate, deps: [], target: i0.ɵɵFactoryTarget.Component });
AswPreviewTemplate.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.4", type: AswPreviewTemplate, selector: "asw-preview-template", inputs: { formContainer: "formContainer" }, ngImport: i0, template: "<div class=\"row\">\r\n    <div class=\"col-md-12 text-right\">\r\n        <button mat-raised-button \r\n                type=\"button\"\r\n                class=\"btn btn-secondary btn-sm float-end mb-2\">Download Pdf\r\n        </button>                \r\n    </div>\r\n</div>\r\n<div class=\"row\">            \r\n    <div class=\"col-md-12\">\r\n        <div class=\"card\">\r\n            <div class=\"card-body\">\r\n                <div class=\"row\">\r\n                    <ng-container *ngFor=\"let control of formContainer; let i = index\">\r\n                        <ng-container [ngSwitch]=\"control.controlType\" class=\"asw-full-width\">\r\n                            <div [ngClass]=\"control.column\">\r\n                                <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n                                    <asw-autocomplete [control]=\"control\"\r\n                                                      [controlIndex]=\"i\">\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                                    </asw-header>\r\n                                </ng-container>\r\n                                <ng-container *ngSwitchCase=\"'image'\">\r\n                                    <asw-image [control]=\"control\"\r\n                                               [controlIndex]=\"i\"\r\n                                               (imageUpdateEvent)=\"updatedControl($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                                    </asw-textbox>\r\n                                </ng-container>\r\n                                <ng-container *ngSwitchCase=\"'textarea'\">\r\n                                    <asw-textarea [control]=\"control\"\r\n                                                    [controlIndex]=\"i\">\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                                    </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                                    </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                                    </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                                    </asw-checkbox>\r\n                                </ng-container>\r\n                                <ng-container *ngSwitchCase=\"'datepicker'\">\r\n                                    <asw-datepicker [control]=\"control\"\r\n                                                    [controlIndex]=\"i\">\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                                    </asw-button>\r\n                                </ng-container>\r\n                                <ng-container *ngSwitchCase=\"'paragraph'\">\r\n                                    <asw-paragraph [control]=\"control\"\r\n                                                    [controlIndex]=\"i\">\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                                    </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                                    </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                                    </asw-gps>\r\n                                </ng-container>\r\n                            </div>\r\n                        </ng-container>\r\n                    </ng-container>\r\n                </div>                        \r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>", components: [{ type: i1.AswAutocomplete, selector: "asw-autocomplete", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["autocompleteUpdateEvent", "autocompleteDeleteEvent"] }, { type: i2.AswHeader, selector: "asw-header", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["headerUpdateEvent", "headerDeleteEvent"] }, { type: i3.AswImage, selector: "asw-image", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["imageUpdateEvent", "imageDeleteEvent"] }, { type: i4.AswTextbox, selector: "asw-textbox", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["textboxUpdateEvent", "textboxDeleteEvent"] }, { type: i5.AswTextarea, selector: "asw-textarea", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["textAreaUpdateEvent", "textAreaDeleteEvent"] }, { type: i6.AswSelect, selector: "asw-select", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["selectUpdateEvent", "selectDeleteEvent"] }, { type: i7.AswMultiSelect, selector: "asw-multi-select", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["multiSelectUpdateEvent", "multiSelectDeleteEvent"] }, { type: i8.AswRadioButton, selector: "asw-radio-button", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["radioButtonUpdateEvent", "radioButtonDeleteEvent"] }, { type: i9.AswCheckbox, selector: "asw-checkbox", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["checkboxUpdateEvent", "checkboxDeleteEvent"] }, { type: i10.AswDatepicker, selector: "asw-datepicker", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["datepickerUpdateEvent", "datepickerDeleteEvent"] }, { type: i11.AswButton, selector: "asw-button", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["buttonUpdateEvent", "buttonDeleteEvent"] }, { type: i12.AswParagraph, selector: "asw-paragraph", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["paragraphUpdateEvent", "paragraphDeleteEvent"] }, { type: i13.AswDivider, selector: "asw-divider", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["dividerDeleteEvent"] }, { type: i14.AswSlideToggle, selector: "asw-slide-toggle", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["slidetoggleUpdateEvent", "slidetoggleDeleteEvent"] }, { type: i15.AswGps, selector: "asw-gps", inputs: ["control", "controlIndex", "isPreviewTemplate"], outputs: ["gpsUpdateEvent", "gpsDeleteEvent"] }], directives: [{ type: i16.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i16.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i16.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i16.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: AswPreviewTemplate, decorators: [{
            type: Component,
            args: [{ selector: 'asw-preview-template', template: "<div class=\"row\">\r\n    <div class=\"col-md-12 text-right\">\r\n        <button mat-raised-button \r\n                type=\"button\"\r\n                class=\"btn btn-secondary btn-sm float-end mb-2\">Download Pdf\r\n        </button>                \r\n    </div>\r\n</div>\r\n<div class=\"row\">            \r\n    <div class=\"col-md-12\">\r\n        <div class=\"card\">\r\n            <div class=\"card-body\">\r\n                <div class=\"row\">\r\n                    <ng-container *ngFor=\"let control of formContainer; let i = index\">\r\n                        <ng-container [ngSwitch]=\"control.controlType\" class=\"asw-full-width\">\r\n                            <div [ngClass]=\"control.column\">\r\n                                <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n                                    <asw-autocomplete [control]=\"control\"\r\n                                                      [controlIndex]=\"i\">\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                                    </asw-header>\r\n                                </ng-container>\r\n                                <ng-container *ngSwitchCase=\"'image'\">\r\n                                    <asw-image [control]=\"control\"\r\n                                               [controlIndex]=\"i\"\r\n                                               (imageUpdateEvent)=\"updatedControl($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                                    </asw-textbox>\r\n                                </ng-container>\r\n                                <ng-container *ngSwitchCase=\"'textarea'\">\r\n                                    <asw-textarea [control]=\"control\"\r\n                                                    [controlIndex]=\"i\">\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                                    </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                                    </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                                    </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                                    </asw-checkbox>\r\n                                </ng-container>\r\n                                <ng-container *ngSwitchCase=\"'datepicker'\">\r\n                                    <asw-datepicker [control]=\"control\"\r\n                                                    [controlIndex]=\"i\">\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                                    </asw-button>\r\n                                </ng-container>\r\n                                <ng-container *ngSwitchCase=\"'paragraph'\">\r\n                                    <asw-paragraph [control]=\"control\"\r\n                                                    [controlIndex]=\"i\">\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                                    </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                                    </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                                    </asw-gps>\r\n                                </ng-container>\r\n                            </div>\r\n                        </ng-container>\r\n                    </ng-container>\r\n                </div>                        \r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>" }]
        }], propDecorators: { formContainer: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 