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 FormCounterComponent extends BaseControl {
    constructor(commonService) {
        super(commonService);
        this.commonService = commonService;
    }
    ngOnInit() {
    }
}
FormCounterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: FormCounterComponent, deps: [{ token: i1.CommonService }], target: i0.ɵɵFactoryTarget.Component });
FormCounterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: FormCounterComponent, selector: "form-counter", 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 class=\"unit-class\">\r\n            <d-input-number\r\n                [attr.name]=\"data.controlname\" \r\n                [min]=\"data.min\"\r\n                [max]=\"data.max\"\r\n                [step]=\"data.step\"\r\n                [(ngModel)]=\"data.defaultvalue\"\r\n                [disabled]=\"data.disabled\"\r\n                [dValidateRules]=\"data.rules\"\r\n            ></d-input-number>\r\n            <div class=\"unit-alg\">{{data.unit}}</div>\r\n          </div>\r\n        </d-form-control>\r\n      </d-form-item>\r\n</ng-template>", styles: [".unit-class{display:flex;flex-direction:row}.unit-alg{line-height:2.2;padding-left:5px}\n"], 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.InputNumberComponent, selector: "d-input-number", inputs: ["step", "disabled", "size", "decimalLimit", "autoFocus", "allowEmpty", "placeholder", "maxLength", "reg", "min", "max"], outputs: ["afterValueChanged", "whileValueChanging"] }], 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"] }, { 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: FormCounterComponent, decorators: [{
            type: Component,
            args: [{ selector: 'form-counter', 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 class=\"unit-class\">\r\n            <d-input-number\r\n                [attr.name]=\"data.controlname\" \r\n                [min]=\"data.min\"\r\n                [max]=\"data.max\"\r\n                [step]=\"data.step\"\r\n                [(ngModel)]=\"data.defaultvalue\"\r\n                [disabled]=\"data.disabled\"\r\n                [dValidateRules]=\"data.rules\"\r\n            ></d-input-number>\r\n            <div class=\"unit-alg\">{{data.unit}}</div>\r\n          </div>\r\n        </d-form-control>\r\n      </d-form-item>\r\n</ng-template>", styles: [".unit-class{display:flex;flex-direction:row}.unit-alg{line-height:2.2;padding-left:5px}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.CommonService }]; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1jb3VudGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Zvcm1idWlsZGVyL3NyYy9saWIvY29udHJvbC9mb3JtLWNvdW50ZXIvZm9ybS1jb3VudGVyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Zvcm1idWlsZGVyL3NyYy9saWIvY29udHJvbC9mb3JtLWNvdW50ZXIvZm9ybS1jb3VudGVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFHbEQsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDOzs7Ozs7O0FBTzdDLE1BQU0sT0FBTyxvQkFBc0IsU0FBUSxXQUF3QjtJQUtqRSxZQUNVLGFBQTJCO1FBRWpDLEtBQUssQ0FBQyxhQUFhLENBQUMsQ0FBQTtRQUZkLGtCQUFhLEdBQWIsYUFBYSxDQUFjO0lBR25DLENBQUM7SUFQSCxRQUFRO0lBQ1IsQ0FBQzs7aUhBSFUsb0JBQW9CO3FHQUFwQixvQkFBb0IsMkVDVmpDLGsvQkFxQmM7MkZEWEQsb0JBQW9CO2tCQUxoQyxTQUFTOytCQUNFLGNBQWMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsIE9uSW5p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