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 FormDateComponent extends BaseControl {
    constructor(commonService) {
        super(commonService);
        this.commonService = commonService;
        this.control = new FormControl();
    }
    ngOnInit() {
    }
}
FormDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: FormDateComponent, deps: [{ token: i1.CommonService }], target: i0.ɵɵFactoryTarget.Component });
FormDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: FormDateComponent, selector: "form-date", 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            <ng-container *ngIf=\"data.datetype=='date'; else datarange\">\r\n              <d-datepicker-pro \r\n                [formControl]=\"control\"\r\n                [attr.name]=\"data.controlname\"\r\n                [(ngModel)]=\"data.defaultvalue\" \r\n                [showTime] = \"data.showtime\" \r\n                [appendToBody]=\"true\"\r\n                [dValidateRules]=\"data.rules\"\r\n                [format]=\"data.dateFormat\"></d-datepicker-pro>\r\n            </ng-container>\r\n              \r\n            <ng-template #datarange>\r\n                <d-range-datepicker-pro\r\n                  [formControl]=\"control\"\r\n                  [attr.name]=\"data.controlname\"\r\n                  [appendToBody]=\"true\"\r\n                  [(ngModel)]=\"data.defaultvalue\"\r\n                  [showTime]=\"data.showtime\"\r\n                  [dValidateRules]=\"data.rules\"\r\n                ></d-range-datepicker-pro>\r\n            </ng-template>\r\n          </d-form-control>\r\n        </d-form-item>\r\n  </ng-template>", styles: ["div.box{padding:10px;font-size:var(--devui-font-size, 12px);color:var(--devui-brand, #5e7ce0);line-height:24px}a.date-link{text-decoration:none;color:inherit;cursor:pointer}a.date-link+a.date-link{margin-left:15px}a.date-link:hover{color:var(--devui-link-active, #344899)}.devui-input-group:not(:last-child){margin-bottom:20px}.devui-input-group-addon{width:1%;vertical-align:middle}.devui-input-group{width:320px}.devui-input-group-addon:hover{color:var(--devui-brand-active, #526ecc)}.close-icon-wrapper{padding:0}.icon-close{border-right:1px solid var(--devui-dividing-line, #dfe1e6);padding-right:10px;cursor:pointer}.custom-css-class{font-weight:700}\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.DatepickerProComponent, selector: "d-datepicker-pro", inputs: ["mode", "showTime", "disabled", "autoOpen", "format", "cssClass", "showAnimation", "appendToBody", "width", "calenderRange", "minDate", "maxDate", "markedRangeDateList", "markedDateList"], outputs: ["dropdownToggle", "confirmEvent"] }, { type: i3.RangeDatepickerProComponent, selector: "d-range-datepicker-pro", inputs: ["mode", "showTime", "disabled", "autoOpen", "format", "locale", "cssClass", "splitter", "width", "startIndexOfWeek", "appendToBody", "calenderRange", "minDate", "maxDate", "markedRangeDateList", "markedDateList"], outputs: ["dropdownToggle", "confirmEvent"] }], 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: FormDateComponent, decorators: [{
            type: Component,
            args: [{ selector: 'form-date', 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            <ng-container *ngIf=\"data.datetype=='date'; else datarange\">\r\n              <d-datepicker-pro \r\n                [formControl]=\"control\"\r\n                [attr.name]=\"data.controlname\"\r\n                [(ngModel)]=\"data.defaultvalue\" \r\n                [showTime] = \"data.showtime\" \r\n                [appendToBody]=\"true\"\r\n                [dValidateRules]=\"data.rules\"\r\n                [format]=\"data.dateFormat\"></d-datepicker-pro>\r\n            </ng-container>\r\n              \r\n            <ng-template #datarange>\r\n                <d-range-datepicker-pro\r\n                  [formControl]=\"control\"\r\n                  [attr.name]=\"data.controlname\"\r\n                  [appendToBody]=\"true\"\r\n                  [(ngModel)]=\"data.defaultvalue\"\r\n                  [showTime]=\"data.showtime\"\r\n                  [dValidateRules]=\"data.rules\"\r\n                ></d-range-datepicker-pro>\r\n            </ng-template>\r\n          </d-form-control>\r\n        </d-form-item>\r\n  </ng-template>", styles: ["div.box{padding:10px;font-size:var(--devui-font-size, 12px);color:var(--devui-brand, #5e7ce0);line-height:24px}a.date-link{text-decoration:none;color:inherit;cursor:pointer}a.date-link+a.date-link{margin-left:15px}a.date-link:hover{color:var(--devui-link-active, #344899)}.devui-input-group:not(:last-child){margin-bottom:20px}.devui-input-group-addon{width:1%;vertical-align:middle}.devui-input-group{width:320px}.devui-input-group-addon:hover{color:var(--devui-brand-active, #526ecc)}.close-icon-wrapper{padding:0}.icon-close{border-right:1px solid var(--devui-dividing-line, #dfe1e6);padding-right:10px;cursor:pointer}.custom-css-class{font-weight:700}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.CommonService }]; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1kYXRlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Zvcm1idWlsZGVyL3NyYy9saWIvY29udHJvbC9mb3JtLWRhdGUvZm9ybS1kYXRlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Zvcm1idWlsZGVyL3NyYy9saWIvY29udHJvbC9mb3JtLWRhdGUvZm9ybS1kYXRlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDbEQsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRTdDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQzs7Ozs7OztBQU83QyxNQUFNLE9BQU8saUJBQWtCLFNBQVEsV0FBVztJQUdoRCxZQUNVLGFBQTJCO1FBRW5DLEtBQUssQ0FBQyxhQUFhLENBQUMsQ0FBQztRQUZiLGtCQUFhLEdBQWIsYUFBYSxDQUFjO1FBRjlCLFlBQU8sR0FBYyxJQUFJLFdBQVcsRUFBRSxDQUFDO0lBSzlDLENBQUM7SUFFRCxRQUF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hLmRhdGVGb3JtYXRcIj48L2QtZGF0ZXBpY2tlci1wcm8+XHJcbiAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICA8bmctdGVtcGxhdGUgI2RhdGFyYW5nZT5cclxuICAgICAgICAgICAgICAgIDxkLXJhbmdlLWRhdGVwaWNrZXItcHJvXHJcbiAgICAgICAgICAgICAgICAgIFtmb3JtQ29udHJvbF09XCJjb250cm9sXCJcclxuICAgICAgICAgICAgICAgICAgW2F0dHIubmFtZV09XCJkYXRhLmNvbnRyb2xuYW1lXCJcclxuICAgICAgICAgICAgICAgICAgW2FwcGVuZFRvQm9keV09XCJ0cnVlXCJcclxuICAgICAgICAgICAgICAgICAgWyhuZ01vZGVsKV09XCJkYXRhLmRlZmF1bHR2YWx1ZVwiXHJcbiAgICAgICAgICAgICAgICAgIFtzaG93VGltZV09XCJkYXRhLnNob3d0aW1lXCJcclxuICAgICAgICAgICAgICAgICAgW2RWYWxpZGF0ZVJ1bGVzXT1cImRhdGEucnVsZXNcIlxyXG4gICAgICAgICAgICAgICAgPjwvZC1yYW5nZS1kYXRlcGlja2VyLXBybz5cclxuICAgICAgICAgICAgPC9uZy10ZW1wbGF0ZT5cclxuICAgICAgICAgIDwvZC1mb3JtLWNvbnRyb2w+XHJcbiAgICAgICAgPC9kLWZvcm0taXRlbT5cclxuICA8L25nLXRlbXBsYXRlPiJdfQ==