/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import d from"./UZ6A3XQC.js";import"./DPJE33GY.js";import{a as m}from"./QN4OORAR.js";import b from"./KFUE7LVT.js";import"./UG7LOBJE.js";import a from"./AD6GOUND.js";import"./4B3QBH5T.js";import"./FUPYXGG6.js";import"./KUVOINJC.js";import"./NKG4FLLR.js";import{F as l,g as o,h as g,m as c,z as h}from"./RPU6VCJ4.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,{n:n}])=>{var u="arcgis-charts-config-storage-colors",_=o`:host{--calcite-color-border-1: transparent}.color-header{margin-bottom:.5rem}`,a=class extends h{constructor(){super(...arguments),this._messages=m(),this.arcgisColorSelect=c()}static{this.properties={messageOverrides:0,rgba:0,heading:1}}static{this.styles=_}onColorSelect(s){let{value:e}=s.target;if(e!==null){let{r,g:t,b:v}=e,i=[r,t,v,255];this.isNewColor(i)&&this.arcgisColorSelect.emit(i)}}isNewColor(s){let e=!1;return this.rgba===void 0?e=!0:s===void 0?e=!1:e=s[0]!==this.rgba[0]||s[1]!==this.rgba[1]||s[2]!==this.rgba[2],e}render(){let s;if(this.rgba!==void 0){let[e,r,t]=this.rgba;s={r:e,g:r,b:t}}return g`<calcite-label>${this.heading??this._messages.color}</calcite-label><calcite-color-picker .value=${n(s)} @calciteColorPickerInput=${this.onColorSelect} .messageOverrides=${{g:this._messages.g,green:this._messages.green,h:this._messages.h,hex:this._messages.hex,hsv:this._messages.hsv,hue:this._messages.hue,r:this._messages.r,red:this._messages.red,rgb:this._messages.rgb,s:this._messages.s,saturation:this._messages.saturation,saveColor:this._messages.saveColor,saved:this._messages.saved,v:this._messages.v,value:this._messages.value}} clearable .storageId=${u} format=rgb></calcite-color-picker>`}};l("arcgis-charts-config-colors",a);return a},a,b,d)