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 FormRateComponent extends BaseControl {
    constructor(commonService) {
        super(commonService);
        this.commonService = commonService;
        this.control = new FormControl();
    }
    ngOnInit() {
    }
}
FormRateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: FormRateComponent, deps: [{ token: i1.CommonService }], target: i0.ɵɵFactoryTarget.Component });
FormRateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: FormRateComponent, selector: "form-rate", 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            <d-rate \r\n            [formControl]=\"control\"\r\n            [(ngModel)]=\"data.defaultvalue\" \r\n            [allowHalf]=\"data.allowhalf\" \r\n            [attr.name]=\"data.controlname\" \r\n            [disabled]=\"data.disabled\" \r\n            [dValidateRules]=\"data.rules\"></d-rate>\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.RateComponent, selector: "d-rate", inputs: ["read", "readonly", "count", "color", "icon", "character", "type", "allowHalf"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: FormRateComponent, decorators: [{
            type: Component,
            args: [{ selector: 'form-rate', 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            <d-rate \r\n            [formControl]=\"control\"\r\n            [(ngModel)]=\"data.defaultvalue\" \r\n            [allowHalf]=\"data.allowhalf\" \r\n            [attr.name]=\"data.controlname\" \r\n            [disabled]=\"data.disabled\" \r\n            [dValidateRules]=\"data.rules\"></d-rate>\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1yYXRlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2V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