/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{a as p}from"./VFKDTBIX.js";import{i as m}from"./GMSXMC4Y.js";import{a as n}from"./EUYSSHX7.js";import"./2GLF4DQN.js";import"./5AI6MQMZ.js";import"./ZNBKMZP7.js";import{O as o,U as r,a as l,b as e,x as c}from"./IWZQMWZ5.js";import"./ALDX5YZO.js";var y=l`:host{width:100%}.root{--calcite-label-margin-bottom: 0;width:100%}.root[layout=inline-space-between] calcite-select{width:var(--arcgis-unit-select-inline-size, 180px)}`,s=class extends o{constructor(){super(...arguments),this.messages=n({}),this.options=[],this.layout="block",this.arcgisUnitSelectChange=c()}static{this.properties={options:[1,{type:Array}],selectLabel:1,value:0,messageOverrides:0,label:1,layout:1}}static{this.styles=y}async destroy(){await this.manager.destroy()}render(){let{messages:a,options:u=[],selectLabel:i,value:h,arcgisUnitSelectChange:g}=this;return e`<calcite-label class="root" .layout=${this.layout}>${i}<calcite-select .label=${i} @calciteSelectChange=${t=>{g.emit(t.target.value)}}>${p(u,t=>t,t=>e`<calcite-option .selected=${t===h} .value=${t}>${m(t)?a.systems?.[t]:a.units?.[t]?.pluralCapitalized}</calcite-option>`)}</calcite-select></calcite-label>`}};r("arcgis-unit-select",s);export{s as ArcgisUnitSelect};
