/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../chunks/_rollupPluginBabelHelpers","../../../chunks/tslib.es6","../../../core/accessorSupport/decorators/property","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/ensureType","../../../core/accessorSupport/decorators/subclass","../../Slider/SliderViewModel"],(function(e,r,o,t,i,n,s,d,l){"use strict";e.SliderWithDropdownViewModel=function(e){function o(r){var o;return(o=e.call(this,r)||this).items=null,o.currentIndex=0,o.isDropdownOpen=!1,o}r._inheritsLoose(o,e);var t=o.prototype;return t.selectItem=function(e){this.currentIndex=e,this.isDropdownOpen=!1},t.toggle=function(){this.isDropdownOpen=!this.isDropdownOpen},r._createClass(o,[{key:"currentItem",get:function(){return null!==this.items&&null!==this.currentIndex&&this.currentIndex<this.items.length?this.items[this.currentIndex]:null}}]),o}(l),o.__decorate([t.property()],e.SliderWithDropdownViewModel.prototype,"items",void 0),o.__decorate([t.property()],e.SliderWithDropdownViewModel.prototype,"currentIndex",void 0),o.__decorate([t.property()],e.SliderWithDropdownViewModel.prototype,"currentItem",null),o.__decorate([t.property()],e.SliderWithDropdownViewModel.prototype,"isDropdownOpen",void 0),e.SliderWithDropdownViewModel=o.__decorate([d.subclass("esri.widgets.Daylight.SliderWithDropdown")],e.SliderWithDropdownViewModel),Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
