/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import{a as p}from"./GXVM7UPW.js";import{i as m}from"./G5VPRDMX.js";import{a as n}from"./H47NPYUM.js";import"./JCTU3MST.js";import"./BXKNMJRR.js";import"./IJQZON2Z.js";import{O as o,U as r,a as l,b as e,x as c}from"./IXZEUVT2.js";import"./H6RQVSYM.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.scale="m",this.layout="block",this.arcgisUnitSelectChange=c()}static{this.properties={options:[1,{type:Array}],scale:1,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:h=[],selectLabel:i,value:u,arcgisUnitSelectChange:g}=this;return e`<calcite-label class="root" .layout=${this.layout} .scale=${this.scale}>${i}<calcite-select .label=${i} @calciteSelectChange=${t=>{g.emit(t.target.value)}} .scale=${this.scale}>${p(h,t=>t,t=>e`<calcite-option .selected=${t===u} .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};
