/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import{d as s}from"./LM56QFP5.js";import{a as f}from"./GXVM7UPW.js";import{a as n}from"./POKO37D3.js";import{a as g}from"./BXKNMJRR.js";import"./IJQZON2Z.js";import{O as p,U as u,a as d,b as i}from"./IXZEUVT2.js";import"./H6RQVSYM.js";export default $arcgis.t(([$])=>{var v=d`:host{--calcite-label-margin-bottom: 0;gap:var(--calcite-spacing-md);flex-direction:column;display:flex}calcite-label{display:block}`,m=class extends p{constructor(){super(...arguments),this.scale="s",this.hideColorPicker=!1,this.hideInterval=!1}static{this.properties={options:0,scale:1,hideColorPicker:5,hideInterval:5,messages:0}}static{this.styles=v}render(){let{options:t,scale:l}=this,{color:r,interval:c}=t,a=this.messages?.discrete;return i`${n({hidden:this.hideInterval,children:i`<calcite-label .scale=${l}>${a?.intervalLabel}<calcite-select .label=${a?.intervalLabel??""} .scale=${l} @calciteSelectChange=${e=>{let b=e.target.value,h=Number.parseInt(b,10);Number.isFinite(h)&&(this.options.interval=h)}}>${f(I,e=>e,e=>i`<calcite-option .selected=${e===c} .value=${String(e)} .label=${C(e,g(this.el).t9nLocale)}></calcite-option>`)}</calcite-select></calcite-label>`})}${n({hidden:this.hideColorPicker,children:i`<arcgis-color-select .color=${r} .label=${a?.colorLabel} @arcgisColorChanged=${e=>{this.options.color=e.detail}}></arcgis-color-select>`})}`}};function C(o,t){return new Intl.DurationFormat(t,{style:"long"}).format(L(o))}function L(o){let t=Math.floor(o/1e3),l=Math.floor(t/3600),r=Math.floor(t%3600/60),c=t%60;return{hours:l,minutes:r,seconds:c}}var I=new $([s(15,"minutes","milliseconds"),s(30,"minutes","milliseconds"),s(1,"hours","milliseconds"),s(2,"hours","milliseconds"),s(3,"hours","milliseconds")]);u("arcgis-shadow-cast-discrete-config",m);return m},"core/Collection")