import{j as d}from"./app-DB4YCWeF.js";import{b as x,B as g}from"./BaseForm-CkSb_d40.js";function C(r){const{name:l,handleChange:n,data:s,placeHolder:o=null,ref:u,disabled:a=!1,formProps:f={}}=r;let{type:e="text",label:c=null,className:t="input",value:i=null}=r,{accept:m="*",multiple:p=!1}=r;e=="file"&&(t="file-input file-input-primary"),c||(c=l.split("_").join(" "));let b=["date","datetime-local","email","file","number","password","tel","text","time","url","color"],y=structuredClone(e)=="currency";return e=b.includes(e)?e:"text",i||(i=y&&a?x(s[l]):s[l]),d.jsx(g,{...r,children:e=="file"?d.jsx("input",{ref:u,type:e,className:`w-full border border-gray-300 disabled:border-gray-300 disabled:text-gray-500 ${t}`,onChange:n,name:l,id:l,placeholder:o,disabled:a,accept:m,multiple:p}):d.jsx("input",{ref:u,type:e,className:`w-full border border-gray-300 disabled:border-gray-300 disabled:text-gray-500 ${t}`,onChange:n,name:l,value:i,id:l,placeholder:o,disabled:a,...f})})}export{C as I};
