"use strict";var H=Object.create;var p=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var M=Object.getPrototypeOf;var T=Object.prototype.hasOwnProperty;var u=(t,e)=>p(t,"name",{value:e,configurable:true});var I=(t,e)=>{for(var o in e)p(t,o,{get:e[o],enumerable:true})};var h=(t,e,o,r)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let n of L(e))if(!T.call(t,n)&&n!==o)p(t,n,{get:()=>e[n],enumerable:!(r=d(e,n))||r.enumerable})}return t};var x=(t,e,o)=>(o=t!=null?H(M(t)):{},h(e||!t||!t.__esModule?p(o,"default",{value:t,enumerable:true}):o,t));var z=t=>h(p({},"__esModule",{value:true}),t);var c=(t,e,o,r)=>{var n=r>1?void 0:r?d(e,o):e;for(var m=t.length-1,a;m>=0;m--)if(a=t[m])n=(r?a(e,o,n):a(n))||n;if(r&&n)p(e,o,n);return n};var R={};I(R,{default:()=>N});module.exports=z(R);var l=require("react/jsx-runtime");var v=x(require("classnames"));var f=require("lodash");var C=require("mobx-react");var i=require("react");var _=require("react-color");let s=class extends i.Component{inputElement=(0,i.createRef)();onChange(e,o){const{onColorChange:r,onChange:n=f.noop}=this.props;r(o);n(e.hex)}render(){const{id:e,name:o,value:r="",placeholder:n="",disabled:m=false,className:a=null,type:g="text",onChange:y=f.noop}=this.props;return(0,l.jsxs)("div",{className:(0,v.default)({"franz-form__field":true,[`${a}`]:a}),ref:this.inputElement,children:[(0,l.jsx)(_.SliderPicker,{color:r,onChange:(E,b)=>this.onChange(E,b),className:"franz-form__input"}),(0,l.jsx)("div",{className:"franz-form__input-wrapper franz-form__input-wrapper__color-picker",children:(0,l.jsx)("input",{id:`${e}-Input`,type:g,className:"franz-form__input",name:o,value:r,placeholder:n,onChange:y,disabled:m})})]})}};u(s,"ColorPickerInput");s=c([C.observer],s);var N=s;
