var _=Object.defineProperty;var x=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var j=(i,e,s)=>e in i?_(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,m=(i,e)=>{for(var s in e||(e={}))y.call(e,s)&&j(i,s,e[s]);if(x)for(var s of x(e))P.call(e,s)&&j(i,s,e[s]);return i};import{a as H,g as K,i as S,aH as z,H as A,j as a,h as r,_ as B,f as E}from"./main-634.js";import{F as f}from"./bf-767-388.js";import{C as L}from"./bf-25-81.js";function G({placeholder:i,type:e,title:s,inputType:o="text",max:c="",min:F="",coolTip:b=""}){var h;const{css:t}=H(),{fieldKey:u}=K(),[g,v]=S(z),l=A(g[u]),N=(n,p)=>{const{value:d}=n.target;if(Number(c)<d&&c!=="")return!0;d?l.config[p]=d:delete l.config[p],v(w=>E(w,C=>{C[u]=l}))};return a.jsxs("div",{className:t(r.flxcb),children:[a.jsxs("div",{className:t({flx:"align-center"},r.w4,f.hover_tip,f.labelTip),children:[a.jsx("label",{htmlFor:e,className:t(r.fw500),children:B(s)}),a.jsx(L,{width:250,icnSize:17,className:"hover-tip",children:a.jsx("div",{className:t(r.tipBody),children:b})})]}),a.jsx("input",m(m({placeholder:i,className:t(f.input,r.w5),value:(h=l==null?void 0:l.config)==null?void 0:h[e],type:o,onChange:n=>N(n,e)},o==="number"&&{max:c}),o==="number"&&{min:F}))]})}export{G as F};
