import{K as e,f as t,_ as r,p as s,h as i,i as a,N as l,O as o,P as n,Q as h,S as d,T as c,j as f}from"./backend-ai-webui-c13f73fb.js";let p=class extends l{constructor(){super(...arguments),this.required=!1,this.nowrap=!1,this.listeners=[]}firstUpdated(e){super.firstUpdated(e),this.listeners.push(o(this,"click",this.refireClick.bind(this))),this.updateAria()}disconnectedCallback(){super.disconnectedCallback(),n(this.listeners)}getTargetElement(){if(null==this.for){const e=h(this.shadowRoot);return e.length>0?e[0]:null}const e="#"===this.for[0]?this.for:`#${this.for}`,t=d(this,e);return t.length>0?t[0]:null}updateAria(){const e=this.getTargetElement();null!=e&&(""==this.id&&(this.id=c()),e.setAttribute("aria-labelledby",this.id))}refireClick(e){const t=this.getTargetElement();null!=t&&e.target!==t&&(t.dispatchEvent(new MouseEvent("click",{relatedTarget:this})),t instanceof HTMLElement&&t.focus())}render(){return f` <slot></slot> `}};p.styles=[e,t(':host{font-size:var(--label-font-size,1rem);font-family:var(--label-font-family,var(--font-family-serif,"Roboto Slab",times,serif));line-height:var(--label-line-height,var(--line-height-m,1.5em));color:var(--label-color,hsl(var(--shade-500,var(--shade-hue,200),var(--shade-saturation,4%),var(--shade-lightness,55%))));cursor:default;display:inline-block}:host([nowrap]){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;line-height:1.1}:host([required]):after{content:"*";color:var(--label-required-color,hsl(var(--error-500,var(--error-hue,3),var(--error-saturation,80%),var(--error-lightness,54%))))}')],r([s({type:Boolean}),i("design:type",Boolean)],p.prototype,"required",void 0),r([s({type:Boolean}),i("design:type",Boolean)],p.prototype,"nowrap",void 0),r([s({type:String}),i("design:type",String)],p.prototype,"for",void 0),p=r([a("wl-label")],p);
