/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{a as h}from"./QRJ7G7C4.js";import{N as l,O as o,P as r,U as d,a as s,b as i,x as n}from"./7H4DKXI2.js";import"./ALDX5YZO.js";var f=s`.label{--calcite-label-margin-bottom: 0}.label-content{display:flex;flex:1;gap:var(--calcite-spacing-sm);align-items:center;text-wrap:balance}.label-content>div{flex-grow:1}.icon{margin-top:-1px;&.info{color:var(--calcite-color-status-info)}&.warning{color:var(--calcite-color-status-warning)}}.tooltip{text-wrap:wrap}`,c=class extends o{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.hintKind="info",this.arcgisCheckedChanged=n()}static{this.properties={_icon:16,checked:7,disabled:7,label:1,hint:1,hintIcon:1,hintKind:1}}static{this.styles=f}async destroy(){await this.manager.destroy()}_setIconRef(e){this._icon=e}render(){let{label:e,hint:a,hintKind:p,hintIcon:g,checked:m,disabled:b}=this;return i`<calcite-label class="label" layout=inline-space-between scale=s>${a?h("label-content",i`<div class="label-content"><div>${e}</div><calcite-icon class=${r(p!=="warning"?"icon info":"icon warning")} .icon=${g??"information"} @click=${t=>t.stopPropagation()} scale=s tabindex=0 ${l(this._setIconRef)}></calcite-icon><calcite-tooltip class="tooltip" overlay-positioning=fixed .referenceElement=${this._icon??void 0}>${a}</calcite-tooltip></div>`):e}<calcite-switch .checked=${m} .disabled=${b} scale=s @calciteSwitchChange=${t=>{this.checked=t.target.checked,this.arcgisCheckedChanged.emit(t.target.checked)}}></calcite-switch></calcite-label>`}};d("arcgis-labeled-switch",c);export{c as LabeledSwitch};
