"use strict";var u=Object.create;var s=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var N=Object.getPrototypeOf;var y=Object.prototype.hasOwnProperty;var p=(a,e)=>s(a,"name",{value:e,configurable:true});var E=(a,e)=>{for(var n in e)s(a,n,{get:e[n],enumerable:true})};var f=(a,e,n,r)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let l of C(e))if(!y.call(a,l)&&l!==n)s(a,l,{get:()=>e[l],enumerable:!(r=d(e,l))||r.enumerable})}return a};var _=(a,e,n)=>(n=a!=null?u(N(a)):{},f(e||!a||!a.__esModule?s(n,"default",{value:a,enumerable:true}):n,a));var w=a=>f(s({},"__esModule",{value:true}),a);var v=(a,e,n,r)=>{var l=r>1?void 0:r?d(e,n):e;for(var i=a.length-1,m;i>=0;i--)if(m=a[i])l=(r?m(e,n,l):m(l))||l;if(r&&l)s(e,n,l);return l};var I={};E(I,{default:()=>z});module.exports=w(I);var o=require("react/jsx-runtime");var h=_(require("classnames"));var c=require("lodash");var b=require("mobx-react");var g=require("react");let t=class extends g.Component{onChange(e){const{field:n,onSliderChange:r=c.noop}=this.props;n.onChange(e);r(e)}render(){const{field:e,className:n="",showLabel:r=true,disabled:l=false,type:i="range"}=this.props;if(e.value===""&&e.default!==""){e.value=e.default}return(0,o.jsxs)("div",{className:(0,h.default)(["franz-form__field","franz-form__slider-wrapper",n]),children:[(0,o.jsx)("div",{className:"slider-container",children:(0,o.jsx)("input",{className:"slider",type:i,id:e.id,name:e.name,value:e.value,min:"1",max:"100",onChange:m=>l?null:this.onChange(m)})}),e.error&&(0,o.jsx)("div",{className:e.error,children:e.error}),e.label&&r&&(0,o.jsx)("label",{className:"franz-form__label",htmlFor:e.id,children:e.label})]})}};p(t,"Slider");t=v([b.observer],t);var z=t;
