import { Component } from '@angular/core';
import { BaseControl } from '../basecontrol';
import * as i0 from "@angular/core";
import * as i1 from "../../service/common.service";
import * as i2 from "../form-box/form-box.component";
import * as i3 from "ng-devui";
import * as i4 from "@angular/common";
import * as i5 from "@angular/forms";
export class FormToggleComponent extends BaseControl {
    constructor(commonService) {
        super(commonService);
        this.commonService = commonService;
    }
    ngOnInit() {
    }
}
FormToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: FormToggleComponent, deps: [{ token: i1.CommonService }], target: i0.ɵɵFactoryTarget.Component });
FormToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: FormToggleComponent, selector: "form-toggle", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data.mode=='op'; else detail\">\r\n    <form-box #box [mainCarry]=\"detail\" [name]=\"data.name\" [controltype]=\"data.controltype\" (controlclick)=\"onClick($event)\"></form-box>\r\n</ng-container>\r\n<ng-template #detail>\r\n    <d-form-item>\r\n        <d-form-label [required]=\"data.required\" [hasHelp]=\"data.help\" [helpTips]=\"data.helptip||''\">{{data.label}}</d-form-label>\r\n        <d-form-control>\r\n            <div>\r\n                <d-toggle [attr.name]=\"data.controlname\" [(ngModel)] = \"data.defaultvalue\" [disabled]=\"data.disabled\"></d-toggle>\r\n            </div>\r\n        </d-form-control>\r\n    </d-form-item>\r\n</ng-template>", styles: [""], components: [{ type: i2.FormBoxComponent, selector: "form-box", inputs: ["mainCarry", "name", "controltype", "additionalcss"], outputs: ["controlclick"] }, { type: i3.FormItemComponent, selector: "d-form-item", inputs: ["dFeedbackType", "dHasFeedback"] }, { type: i3.FormLabelComponent, selector: "d-form-label", inputs: ["required", "hasHelp", "helpTips"] }, { type: i3.FormControlComponent, selector: "d-form-control", inputs: ["extraInfo", "feedbackStatus", "suffixTemplate"] }, { type: i3.ToggleComponent, selector: "d-toggle", inputs: ["size", "color", "beforeChange", "checkedContent", "uncheckedContent", "checked", "disabled"], outputs: ["change"], exportAs: ["toggle"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: FormToggleComponent, decorators: [{
            type: Component,
            args: [{ selector: 'form-toggle', template: "<ng-container *ngIf=\"data.mode=='op'; else detail\">\r\n    <form-box #box [mainCarry]=\"detail\" [name]=\"data.name\" [controltype]=\"data.controltype\" (controlclick)=\"onClick($event)\"></form-box>\r\n</ng-container>\r\n<ng-template #detail>\r\n    <d-form-item>\r\n        <d-form-label [required]=\"data.required\" [hasHelp]=\"data.help\" [helpTips]=\"data.helptip||''\">{{data.label}}</d-form-label>\r\n        <d-form-control>\r\n            <div>\r\n                <d-toggle [attr.name]=\"data.controlname\" [(ngModel)] = \"data.defaultvalue\" [disabled]=\"data.disabled\"></d-toggle>\r\n            </div>\r\n        </d-form-control>\r\n    </d-form-item>\r\n</ng-template>", styles: [""] }]
        }], ctorParameters: function () { return [{ type: i1.CommonService }]; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS10b2dnbGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZm9ybWJ1aWxkZXIvc3JjL2xpYi9jb250cm9sL2Zvcm0tdG9nZ2xlL2Zvcm0tdG9nZ2xlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Zvcm1idWlsZGVyL3NyYy9saWIvY29udHJvbC9mb3JtLXRv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