import { Component } from '@angular/core';
import { FormControl } from '@angular/forms';
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 FormInputComponent extends BaseControl {
    constructor(commonService) {
        super(commonService);
        this.commonService = commonService;
        this.control = new FormControl();
    }
    ngOnInit() {
    }
}
FormInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: FormInputComponent, deps: [{ token: i1.CommonService }], target: i0.ɵɵFactoryTarget.Component });
FormInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: FormInputComponent, selector: "form-input", 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          <input \r\n          dTextInput \r\n          [formControl]=\"control\"\r\n          autocomplete=\"off\" \r\n          [(ngModel)]=\"data.defaultvalue\" \r\n          [attr.name]=\"data.controlname\" \r\n          [placeholder]=\"data.placeholder\" \r\n          [dValidateRules]=\"data.rules\" \r\n          [disabled]=\"data.disabled\" />\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"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.TextDirective, selector: "[dTextInput]", inputs: ["error", "size"], exportAs: ["dTextInput"] }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.DFormControlRuleDirective, selector: "[dValidateRules][formControlName],[dValidateRules][ngModel],[dValidateRules][formControl]", inputs: ["dValidateRules", "dValidatePopConfig"], outputs: ["dRulesStatusChange"], exportAs: ["dValidateRules"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: FormInputComponent, decorators: [{
            type: Component,
            args: [{ selector: 'form-input', 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          <input \r\n          dTextInput \r\n          [formControl]=\"control\"\r\n          autocomplete=\"off\" \r\n          [(ngModel)]=\"data.defaultvalue\" \r\n          [attr.name]=\"data.controlname\" \r\n          [placeholder]=\"data.placeholder\" \r\n          [dValidateRules]=\"data.rules\" \r\n          [disabled]=\"data.disabled\" />\r\n        </d-form-control>\r\n      </d-form-item>\r\n</ng-template>", styles: [""] }]
        }], ctorParameters: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