import { ChangeDetectorRef, Component, ElementRef, HostBinding, Input, Renderer2 } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "ng-devui/popover";
export class FormLabelComponent {
    constructor(cdr, elementRef, renderer) {
        this.cdr = cdr;
        this.required = false;
        this.hasHelp = false;
        this.helpTips = '';
        this.feedbackStatus = null;
        renderer.addClass(elementRef.nativeElement, 'devui-form-label');
    }
    get status() {
        return this.feedbackStatus !== null;
    }
    updateFeedbackStatus(status) {
        this.feedbackStatus = status;
        this.cdr.detectChanges();
    }
}
FormLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: FormLabelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
FormLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: FormLabelComponent, selector: "d-form-label", inputs: { required: "required", hasHelp: "hasHelp", helpTips: "helpTips" }, host: { properties: { "class.devui-form-label-has-feedback": "this.status" } }, ngImport: i0, template: "<span class=\"devui-form-span\" [ngClass]=\"{ 'devui-required': required }\">\n  <ng-content></ng-content>\n</span>\n<svg\n  *ngIf=\"hasHelp\"\n  dPopover\n  [content]=\"helpTipsTemplate\"\n  [popType]=\"'info'\"\n  [position]=\"'top'\"\n  [controlled]=\"true\"\n  trigger=\"hover\"\n  class=\"devui-helping\"\n  width=\"16px\"\n  height=\"16px\"\n  viewBox=\"0 0 16 16\"\n>\n  <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n    <path\n      d=\"M8,1 C9.88227821,1 11.6450792,1.74560326 12.9497351,3.05025198 C14.2543924,4.35492369 15,6.11772556 15,8 C15,9.88227587 14.2543913,11.6450767 12.949734,12.949734 C11.6450767,14.2543913 9.88227587,15 8,15 C6.11772556,15 4.35492369,14.2543924 3.05024866,12.9497318 C1.74560326,11.6450792 1,9.88227821 1,8 C1,6.11772322 1.74560213,4.35492125 3.0502542,3.05024755 C4.35492125,1.74560213 6.11772322,1 8,1 Z M8,11.2634757 C7.47757297,11.2634757 7.05405405,11.6869946 7.05405405,12.2094216 C7.05405405,12.7318486 7.47757297,13.1553676 8,13.1553676 C8.52242703,13.1553676 8.94594595,12.7318486 8.94594595,12.2094216 C8.94594595,11.6869946 8.52242703,11.2634757 8,11.2634757 Z M8,3.12834054 C6.43270866,3.12834054 5.16216216,4.39888703 5.16216216,5.96617838 C5.16216216,6.27963729 5.41627082,6.53374595 5.72972973,6.53374595 C6.04318864,6.53374595 6.2972973,6.27963729 6.2972973,5.96617838 C6.2972973,5.02580486 7.05962648,4.26347568 8,4.26347568 C8.94037352,4.26347568 9.7027027,5.02580486 9.7027027,5.96617838 C9.7027027,6.9065519 8.94037352,7.66888108 8,7.66888108 C7.68654109,7.66888108 7.43243243,7.92298974 7.43243243,8.23644865 L7.43243243,8.23644865 L7.43243243,9.74996216 L7.44157671,9.85198315 C7.48963374,10.1167525 7.72136986,10.3175297 8,10.3175297 L8,10.3175297 L8.10202099,10.3083855 C8.36679036,10.2603284 8.56756757,10.0285923 8.56756757,9.74996216 L8.56756757,9.74996216 L8.56756757,8.74578378 L8.72552115,8.71042694 C9.94134023,8.38984467 10.8378378,7.28270311 10.8378378,5.96617838 C10.8378378,4.39888703 9.56729134,3.12834054 8,3.12834054 Z\"\n      fill-rule=\"nonzero\"\n    ></path>\n  </g>\n</svg>\n<svg *ngIf=\"feedbackStatus === 'error'\" class=\"devui-icon devui-icon-error\" width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n  <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n    <circle cx=\"8\" cy=\"8\" r=\"7\"></circle>\n    <path\n      d=\"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,12.6 L7,12.6 L7,10.6 L9,10.6 L9,12.6 Z M9,9.1 L7,9.1 L6.9,3.1 L9.1,3.1 L9,9.1 Z\"\n      fill-rule=\"nonzero\"\n    ></path>\n  </g>\n</svg>\n<ng-template #helpTipsTemplate>\n  <span class=\"devui-help-tips\">{{ helpTips }}</span>\n</ng-template>\n", styles: [".mr-content-spacing{margin-right:4px}.padding-element-spacing{padding:16px!important}.ml-element-spacing{margin-left:16px}.mr-element-spacing{margin-right:16px}.mt-element-spacing{margin-top:16px}.mb-element-spacing{margin-bottom:16px}.mlr-element-spacing{margin-left:16px;margin-right:16px}.mtb-element-spacing{margin-top:16px;margin-bottom:16px}.m-element-spacing{margin:16px}.grid{letter-spacing:-.31em;*letter-spacing: normal;word-spacing:-.43em}.u,.u-1,.u-1-2,.u-1-3,.u-2-3,.u-1-4,.u-3-4,.u-1-5,.u-2-5,.u-3-5,.u-4-5,.u-1-6,.u-5-6,.u-1-8,.u-3-8,.u-5-8,.u-7-8,.u-1-12,.u-5-12,.u-7-12,.u-11-12,.u-1-24,.u-5-24,.u-7-24,.u-11-24,.u-13-24,.u-17-24,.u-19-24,.u-23-24{display:inline-block;*display: inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top}.u-1{display:block}.u-1-2{width:49.99999%}.u-1-3{width:33.33333%}.u-2-3{width:66.66666%}.u-1-4{width:24.99999%}.u-3-4{width:74.99999%}.u-1-5{width:19.99999%}.u-2-5{width:39.99999%}.u-3-5{width:59.99999%}.u-4-5{width:79.99999%}.u-1-6{width:16.64999%}.u-5-6{width:83.33333%}.u-1-8{width:12.49999%}.u-3-8{width:37.49999%}.u-5-8{width:62.49999%}.u-7-8{width:87.49999%}.u-1-12{width:8.33333%}.u-5-12{width:41.66666%}.u-7-12{width:58.33333%}.u-11-12{width:91.66666%}.u-1-24{width:4.16666%}.u-5-24{width:20.83333%}.u-7-24{width:29.16666%}.u-11-24{width:45.83333%}.u-13-24{width:54.16666%}.u-17-24{width:70.83333%}.u-19-24{width:79.16666%}.u-23-24{width:95.83333%}.u-content{padding:0 0 10px 10px}.devui-form-span{position:relative;display:inline-block;vertical-align:middle;color:#252b3a;color:var(--devui-text, #252b3a)}.devui-form-span.devui-required:before{content:\"*\";color:red;display:inline-block;margin-right:4px;margin-left:-8px;vertical-align:middle}:host-context(.devui-form-item:hover) .svg-close{display:inline-block;cursor:pointer}.devui-helping{display:inline-block;vertical-align:middle;margin-left:4px;cursor:pointer}.devui-helping path{fill:#d7d8da;fill:var(--devui-shape-icon-fill, #d7d8da)}.devui-help-tips{display:inline-block;margin-left:20px;max-width:200px}.devui-form-horizontal :host.devui-form-label{flex:0 0 100px;justify-content:flex-end;text-align:left;align-self:flex-start}.devui-form-horizontal :host.devui-form-label .devui-form-span{line-height:28px}.devui-form-lg.devui-form-horizontal :host.devui-form-label{flex:0 0 150px}.devui-form-sm.devui-form-horizontal :host.devui-form-label{flex:0 0 80px}.devui-form-horizontal.devui-form-label-align-center :host.devui-form-label{text-align:center}.devui-form-horizontal.devui-form-label-align-end :host.devui-form-label{text-align:right}.devui-form-vertical :host.devui-form-label{flex:1 1 auto;-moz-box-flex:1;text-align:left;padding-bottom:8px;justify-content:flex-start;align-self:flex-start}.devui-form-columns :host.devui-form-label{flex:1 1 auto;text-align:right;padding-bottom:8px;justify-content:flex-end;align-self:flex-start}.devui-form-lg.devui-form-columns :host.devui-form-label{flex:0 0 150px;justify-content:flex-end;text-align:right;align-self:flex-start}.devui-form-sm.devui-form-columns :host.devui-form-label{flex:0 0 80px;justify-content:flex-end;text-align:right;align-self:flex-start}.devui-icon.devui-icon-error{margin-left:4px;display:inline-block;vertical-align:middle;position:relative;top:-.1em}.devui-icon.devui-icon-error>g>path{fill:#f66f6a;fill:var(--devui-danger, #f66f6a)}.devui-icon.devui-icon-error>g>circle{fill:#fff;fill:var(--devui-light-text, #ffffff)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.PopoverDirective, selector: "[dPopover]", inputs: ["content", "controlled", "position", "showAnimation", "showAnimate", "scrollElement", "appendToBody", "zIndex", "popType", "popMaxWidth", "trigger", "hoverToContent", "hoverDelayTime", "popoverStyle", "mouseEnterDelay", "mouseLeaveDelay", "visible"], exportAs: ["dPopover"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: FormLabelComponent, decorators: [{
            type: Component,
            args: [{ selector: 'd-form-label', preserveWhitespaces: false, template: "<span class=\"devui-form-span\" [ngClass]=\"{ 'devui-required': required }\">\n  <ng-content></ng-content>\n</span>\n<svg\n  *ngIf=\"hasHelp\"\n  dPopover\n  [content]=\"helpTipsTemplate\"\n  [popType]=\"'info'\"\n  [position]=\"'top'\"\n  [controlled]=\"true\"\n  trigger=\"hover\"\n  class=\"devui-helping\"\n  width=\"16px\"\n  height=\"16px\"\n  viewBox=\"0 0 16 16\"\n>\n  <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n    <path\n      d=\"M8,1 C9.88227821,1 11.6450792,1.74560326 12.9497351,3.05025198 C14.2543924,4.35492369 15,6.11772556 15,8 C15,9.88227587 14.2543913,11.6450767 12.949734,12.949734 C11.6450767,14.2543913 9.88227587,15 8,15 C6.11772556,15 4.35492369,14.2543924 3.05024866,12.9497318 C1.74560326,11.6450792 1,9.88227821 1,8 C1,6.11772322 1.74560213,4.35492125 3.0502542,3.05024755 C4.35492125,1.74560213 6.11772322,1 8,1 Z M8,11.2634757 C7.47757297,11.2634757 7.05405405,11.6869946 7.05405405,12.2094216 C7.05405405,12.7318486 7.47757297,13.1553676 8,13.1553676 C8.52242703,13.1553676 8.94594595,12.7318486 8.94594595,12.2094216 C8.94594595,11.6869946 8.52242703,11.2634757 8,11.2634757 Z M8,3.12834054 C6.43270866,3.12834054 5.16216216,4.39888703 5.16216216,5.96617838 C5.16216216,6.27963729 5.41627082,6.53374595 5.72972973,6.53374595 C6.04318864,6.53374595 6.2972973,6.27963729 6.2972973,5.96617838 C6.2972973,5.02580486 7.05962648,4.26347568 8,4.26347568 C8.94037352,4.26347568 9.7027027,5.02580486 9.7027027,5.96617838 C9.7027027,6.9065519 8.94037352,7.66888108 8,7.66888108 C7.68654109,7.66888108 7.43243243,7.92298974 7.43243243,8.23644865 L7.43243243,8.23644865 L7.43243243,9.74996216 L7.44157671,9.85198315 C7.48963374,10.1167525 7.72136986,10.3175297 8,10.3175297 L8,10.3175297 L8.10202099,10.3083855 C8.36679036,10.2603284 8.56756757,10.0285923 8.56756757,9.74996216 L8.56756757,9.74996216 L8.56756757,8.74578378 L8.72552115,8.71042694 C9.94134023,8.38984467 10.8378378,7.28270311 10.8378378,5.96617838 C10.8378378,4.39888703 9.56729134,3.12834054 8,3.12834054 Z\"\n      fill-rule=\"nonzero\"\n    ></path>\n  </g>\n</svg>\n<svg *ngIf=\"feedbackStatus === 'error'\" class=\"devui-icon devui-icon-error\" width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n  <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n    <circle cx=\"8\" cy=\"8\" r=\"7\"></circle>\n    <path\n      d=\"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,12.6 L7,12.6 L7,10.6 L9,10.6 L9,12.6 Z M9,9.1 L7,9.1 L6.9,3.1 L9.1,3.1 L9,9.1 Z\"\n      fill-rule=\"nonzero\"\n    ></path>\n  </g>\n</svg>\n<ng-template #helpTipsTemplate>\n  <span class=\"devui-help-tips\">{{ helpTips }}</span>\n</ng-template>\n", styles: [".mr-content-spacing{margin-right:4px}.padding-element-spacing{padding:16px!important}.ml-element-spacing{margin-left:16px}.mr-element-spacing{margin-right:16px}.mt-element-spacing{margin-top:16px}.mb-element-spacing{margin-bottom:16px}.mlr-element-spacing{margin-left:16px;margin-right:16px}.mtb-element-spacing{margin-top:16px;margin-bottom:16px}.m-element-spacing{margin:16px}.grid{letter-spacing:-.31em;*letter-spacing: normal;word-spacing:-.43em}.u,.u-1,.u-1-2,.u-1-3,.u-2-3,.u-1-4,.u-3-4,.u-1-5,.u-2-5,.u-3-5,.u-4-5,.u-1-6,.u-5-6,.u-1-8,.u-3-8,.u-5-8,.u-7-8,.u-1-12,.u-5-12,.u-7-12,.u-11-12,.u-1-24,.u-5-24,.u-7-24,.u-11-24,.u-13-24,.u-17-24,.u-19-24,.u-23-24{display:inline-block;*display: inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top}.u-1{display:block}.u-1-2{width:49.99999%}.u-1-3{width:33.33333%}.u-2-3{width:66.66666%}.u-1-4{width:24.99999%}.u-3-4{width:74.99999%}.u-1-5{width:19.99999%}.u-2-5{width:39.99999%}.u-3-5{width:59.99999%}.u-4-5{width:79.99999%}.u-1-6{width:16.64999%}.u-5-6{width:83.33333%}.u-1-8{width:12.49999%}.u-3-8{width:37.49999%}.u-5-8{width:62.49999%}.u-7-8{width:87.49999%}.u-1-12{width:8.33333%}.u-5-12{width:41.66666%}.u-7-12{width:58.33333%}.u-11-12{width:91.66666%}.u-1-24{width:4.16666%}.u-5-24{width:20.83333%}.u-7-24{width:29.16666%}.u-11-24{width:45.83333%}.u-13-24{width:54.16666%}.u-17-24{width:70.83333%}.u-19-24{width:79.16666%}.u-23-24{width:95.83333%}.u-content{padding:0 0 10px 10px}.devui-form-span{position:relative;display:inline-block;vertical-align:middle;color:#252b3a;color:var(--devui-text, #252b3a)}.devui-form-span.devui-required:before{content:\"*\";color:red;display:inline-block;margin-right:4px;margin-left:-8px;vertical-align:middle}:host-context(.devui-form-item:hover) .svg-close{display:inline-block;cursor:pointer}.devui-helping{display:inline-block;vertical-align:middle;margin-left:4px;cursor:pointer}.devui-helping path{fill:#d7d8da;fill:var(--devui-shape-icon-fill, #d7d8da)}.devui-help-tips{display:inline-block;margin-left:20px;max-width:200px}.devui-form-horizontal :host.devui-form-label{flex:0 0 100px;justify-content:flex-end;text-align:left;align-self:flex-start}.devui-form-horizontal :host.devui-form-label .devui-form-span{line-height:28px}.devui-form-lg.devui-form-horizontal :host.devui-form-label{flex:0 0 150px}.devui-form-sm.devui-form-horizontal :host.devui-form-label{flex:0 0 80px}.devui-form-horizontal.devui-form-label-align-center :host.devui-form-label{text-align:center}.devui-form-horizontal.devui-form-label-align-end :host.devui-form-label{text-align:right}.devui-form-vertical :host.devui-form-label{flex:1 1 auto;-moz-box-flex:1;text-align:left;padding-bottom:8px;justify-content:flex-start;align-self:flex-start}.devui-form-columns :host.devui-form-label{flex:1 1 auto;text-align:right;padding-bottom:8px;justify-content:flex-end;align-self:flex-start}.devui-form-lg.devui-form-columns :host.devui-form-label{flex:0 0 150px;justify-content:flex-end;text-align:right;align-self:flex-start}.devui-form-sm.devui-form-columns :host.devui-form-label{flex:0 0 80px;justify-content:flex-end;text-align:right;align-self:flex-start}.devui-icon.devui-icon-error{margin-left:4px;display:inline-block;vertical-align:middle;position:relative;top:-.1em}.devui-icon.devui-icon-error>g>path{fill:#f66f6a;fill:var(--devui-danger, #f66f6a)}.devui-icon.devui-icon-error>g>circle{fill:#fff;fill:var(--devui-light-text, #ffffff)}\n"] }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { required: [{
                type: Input
            }], hasHelp: [{
                type: Input
            }], helpTips: [{
                type: Input
            }], status: [{
                type: HostBinding,
                args: ['class.devui-form-label-has-feedback']
            }] } });
//# sourceMappingURL=data:application/json;base64, 