/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["require","exports","../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../core/maybe","../../core/reactiveUtils","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","../Widget","../support/widgetUtils","../support/jsxFactory","./css"],(function(e,o,t,r,a,n,i,l,s,c,d,u,p,h,b){"use strict";o.LabeledSlider=function(o){function r(e){var t;return(t=o.call(this,e)||this).debounceDelay=200,t._onChangeTimeout=null,t._onChangeDebounced=e=>{const o=e.target.value;t._cancelChange(),t._onChangeTimeout=setTimeout((()=>t.onChange(o)),t.debounceDelay)},t._cancelChange=()=>{a.isSome(t._onChangeTimeout)&&(clearTimeout(t._onChangeTimeout),t._onChangeTimeout=null)},t}t._inheritsLoose(r,o);var i=r.prototype;return i.initialize=function(){this.own([n.watch((()=>this.onChange),(()=>{this._cancelChange()}))])},i.render=function(){const{label:e,disabled:o}=this;return h.tsx("div",{class:b.LABELED_SLIDER_CSS.base},h.tsx("calcite-label",{scale:"s",disabled:o},e,h.tsx("calcite-slider",{"aria-label":e,disabled:this.disabled,max:1,min:0,step:.01,value:this.value,onCalciteSliderInput:this._onChangeDebounced,onCalciteSliderChange:this._onChangeDebounced})))},i.destroy=function(){this._cancelChange()},i.loadDependencies=function(){var o=t._asyncToGenerator((function*(){yield new Promise(((o,t)=>e(["../../chunks/calcite-slider"],o,t)))}));function r(){return o.apply(this,arguments)}return r}(),r}(u),r.__decorate([i.property()],o.LabeledSlider.prototype,"value",void 0),r.__decorate([i.property()],o.LabeledSlider.prototype,"onChange",void 0),r.__decorate([i.property()],o.LabeledSlider.prototype,"disabled",void 0),r.__decorate([i.property()],o.LabeledSlider.prototype,"debounceDelay",void 0),o.LabeledSlider=r.__decorate([d.subclass("esri.widgets.Weather.LabeledSlider")],o.LabeledSlider),Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
