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