/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../../core/deprecate.js";import r from"../../core/Logger.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import a from"./SmartMappingSliderBase.js";import l from"./HeatmapSlider/HeatmapSliderViewModel.js";import{globalCss as o}from"../support/globalCss.js";import{messageBundle as p,tsx as n}from"../support/widget.js";var d;const m="esri-heatmap-slider",c={base:m,rampElement:`${m}__ramp`,sliderContainer:`${m}__slider-container`,track:`${m}--interactive-track`};let g=d=class extends a{constructor(e,s){super(e,s),this.messages=null,this.viewModel=new l,this.slider.set({visibleElements:{labels:!1,rangeLabels:!0},labelInputsEnabled:!1,rangeLabelInputsEnabled:!1}),this._rampFillId=`${this.id}-ramp-fill`,this.announceDeprecation=()=>{t(r.getLogger(this),"Slider Heatmap","arcgis-slider-heatmap-legacy",{version:"5.0"})}}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get stops(){return this.viewModel.stops}set stops(e){this.viewModel.stops=e}static fromHeatmapRendererResult(e){return new d({stops:e.renderer.colorStops})}render(){const{state:e,label:t,visibleElements:r}=this,s="disabled"===e,i=this.classes(c.base,o.widget,o.panel,{[o.disabled]:s,[c.track]:!!r.interactiveTrack});return n("div",{"aria-label":t,class:i},s?null:this.renderContent(this._renderRamp(),c.sliderContainer))}_renderRamp(){const{_rampFillId:e,viewModel:t}=this,r=t.getStopInfo();return n("div",{class:c.rampElement},n("svg",{xmlns:"http://www.w3.org/2000/svg"},n("defs",null,this.renderRampFillDefinition(e,r)),n("rect",{fill:`url(#${e})`,height:"100%",width:"100%",x:"0",y:"0"})))}};e([s()],g.prototype,"label",null),e([s(),p("esri/widgets/smartMapping/HeatmapSlider/t9n/HeatmapSlider")],g.prototype,"messages",void 0),e([s()],g.prototype,"stops",null),e([s({type:l})],g.prototype,"viewModel",void 0),g=d=e([i("esri.widgets.smartMapping.HeatmapSlider")],g);const h=g;export{h as default};
