/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../core/accessorSupport/decorators/aliasOf","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/property","../../core/accessorSupport/decorators/subclass","./SmartMappingSliderBase","./HeatmapSlider/HeatmapSliderViewModel","../support/widgetUtils","../support/decorators/messageBundle","../support/jsxFactory"],(function(e,r,s,t,a,i,l,o,n,d,p,c,u){"use strict";var m;const g={base:"esri-heatmap-slider",rampElement:"esri-heatmap-slider__ramp",sliderContainer:"esri-heatmap-slider__slider-container",track:"esri-heatmap-slider--interactive-track",esriWidget:"esri-widget",esriWidgetPanel:"esri-widget--panel",widgetIcon:"esri-icon-edit",disabled:"esri-disabled"};let b=m=function(r){function s(e,s){var t;return(t=r.call(this,e,s)||this)._rampFillId=null,t.label=void 0,t.messages=null,t.stops=null,t.viewModel=new d,t.slider.set({visibleElements:{labels:!1,rangeLabels:!0},labelInputsEnabled:!1,rangeLabelInputsEnabled:!1}),t._rampFillId=`${t.id}-ramp-fill`,t}e._inheritsLoose(s,r),s.fromHeatmapRendererResult=function(e){return new m({stops:e.renderer.colorStops})};var t=s.prototype;return t.render=function(){const{state:e,label:r,visibleElements:s}=this,t="disabled"===e,a=this.classes(g.base,g.esriWidget,g.esriWidgetPanel,{[g.disabled]:t,[g.track]:s.interactiveTrack});return u.tsx("div",{"aria-label":r,class:a},t?null:this.renderContent(this.renderRamp(),g.sliderContainer))},t.renderRamp=function(){const{_rampFillId:e,viewModel:r}=this,s=r.getStopInfo();return u.tsx("div",{class:g.rampElement},u.tsx("svg",{xmlns:"http://www.w3.org/2000/svg"},u.tsx("defs",null,this.renderRampFillDefinition(e,s)),u.tsx("rect",{x:"0",y:"0",fill:`url(#${e})`,height:"100%",width:"100%"})))},s}(n.SmartMappingSliderBase);r.__decorate([l.property({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],b.prototype,"label",void 0),r.__decorate([l.property(),c.messageBundle("esri/widgets/smartMapping/HeatmapSlider/t9n/HeatmapSlider")],b.prototype,"messages",void 0),r.__decorate([s.aliasOf("viewModel.stops")],b.prototype,"stops",void 0),r.__decorate([l.property()],b.prototype,"viewModel",void 0),b=m=r.__decorate([o.subclass("esri.widgets.smartMapping.HeatmapSlider")],b);return b}));
