"use strict";var React=require("react"),Slider=require("./Slider-c65c18fd.js"),stringUtil=require("./stringUtil-dea69be9.js"),classNames=require("classnames"),_=require("lodash");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function _interopNamespace(a){if(a&&a.__esModule)return a;var r=Object.create(null);return a&&Object.keys(a).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(a,e),Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:function(){return a[e]}}))}),r.default=a,Object.freeze(r)}var React__namespace=_interopNamespace(React),classNames__default=_interopDefaultLegacy(classNames),prefixCls="dm-map-base-slider-input",InputWraper=function(e){function t(e){e=Number(e),_.isNumber(e)?r&&r(e):stringUtil.toastApi.warning("Illegal number")}var a=e.value,r=e.onPressEnter,e=null==a?void 0:a.toString();return React__namespace.createElement("div",{style:{width:70}},React__namespace.createElement(stringUtil.Input,{size:"compact",type:"menu-bg",block:!0,allowClear:!1,defaultValue:e,onPressEnter:function(e){e=e.target;t(e.value)},onBlur:function(e){e=e.target;t(e.value)}}))},SliderInput=function(e){function t(e){i&&i(e)}var a=e.min,r=e.max,n=e.step,l=e.className,s=e.value,c=e.range,i=e.onChange,e=e.renderInput,e=void 0===e||e;return React__namespace.createElement("div",{className:classNames__default.default(prefixCls,l)},React__namespace.createElement("div",{style:{flex:1}},React__namespace.createElement(Slider.Slider,{range:c,min:a,max:r,step:n,size:"small",defaultValue:s,onAfterChange:t})),e&&React__namespace.createElement(InputWraper,{value:s,onPressEnter:t}))};exports.SliderInput=SliderInput;
