import{h as t,r as e,c as i,H as s,g as n}from"./p-6b2342e0.js";import{s as o}from"./p-717cb35f.js";import{c as r,V as a}from"./p-dcc98162.js";import{I as l}from"./p-c45f0189.js";import{V as f,I as p}from"./p-9deec7a5.js";import{c as h}from"./p-2727511f.js";import{c,x as d}from"./p-633fe47e.js";import{c as m}from"./p-86194314.js";import"./p-9ec80349.js";import"./p-816f6fc6.js";import"./p-243c99c3.js";import"./p-2ade684f.js";import"./p-2d3e1a65.js";import"./p-331a62d5.js";import"./p-2aaf314b.js";import"./p-b75ee3ba.js";var x=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class b extends a{constructor(){super(...arguments),this.handleSuffixButtonClick=t=>{t.stopPropagation(),this.suffixButtonClickEventEmitter.emit()}}render(){if(this.suffixButtonConfig||this.suffixButtonProps){const{icon:e,text:i,size:s,minWidth:n,maxWidth:o,placement:r="right",alignment:a="start",trigger:l="hover"}=this.suffixButtonConfig||this.suffixButtonProps&&{icon:this.suffixButtonProps.icon,text:this.suffixButtonProps.tooltipText,trigger:this.suffixButtonProps.trigger};return t("div",{class:"label-suffix-button",role:"button",tabIndex:0,onClick:this.handleSuffixButtonClick,onKeyDown:m()},i?t("vega-tooltip",{trigger:l,text:i,size:s,minWidth:n,maxWidth:o,alignment:a,placement:r},this.renderSuffixButton(e)):this.renderSuffixButton(e))}}renderSuffixButton(e){return t("vega-button-circle",{size:"extra-small",variant:"icon-only",iconColor:"text-link",showTooltip:!1,icon:e})}}x([r()],b.prototype,"suffixButtonProps",void 0),x([r()],b.prototype,"suffixButtonConfig",void 0),x([r()],b.prototype,"suffixButtonClickEventEmitter",void 0);var g=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const u=class{constructor(t){e(this,t),this.vegaClick=i(this,"vegaClick",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",1),this.labelButtonClick=i(this,"labelButtonClick",1),this.globalSlimmers={},this.clickEventEmitter=h(u,c),this.suffixButtonClickEventEmitter=h(u,d),this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.suffixElementRenderer=new b,this.suffixButtonProps=null,this.suffixButtonConfig=null,this.label="",this.isFieldRequired=!1,this.disabled=!1,this.handleClick=t=>{this.clickEventEmitter.emit(void 0,t)}}componentWillLoad(){""===this.label&&(this.label=this.host.textContent,this.host.textContent="")}render(){return o(t(s,{class:{hidden:""===this.label,disabled:this.disabled},onClick:this.handleClick},t("label",null,t("span",{class:"vega-field-label"},this.label),t("span",{class:{"vega-field-label-required":!0,hidden:!this.isFieldRequired}},"*")),this.suffixElementRenderer.render()),this.host)}get host(){return n(this)}};g([p()],u.prototype,"globalSlimmers",void 0),g([l()],u.prototype,"clickEventEmitter",void 0),g([l()],u.prototype,"suffixButtonClickEventEmitter",void 0),g([l()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),g([l()],u.prototype,"suffixElementRenderer",void 0),u.style=':host{display:inline-block}:host(.disabled){pointer-events:none}:host(.hidden){display:none}label:first-of-type{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;word-break:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host(.disabled)>label>span.vega-field-label{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-field-label-required{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-field-label-required.hidden{display:none}.label-suffix-button{display:inline-block;margin-left:4px;vertical-align:top}';export{u as vega_field_label}