import{r as E,j as r}from"./app-DC5MhnUn.js";import{c as I}from"./compiler-runtime-x4HYykYJ.js";const R=E.forwardRef((N,$)=>{const e=I.c(42);let t,s,a,p,u,h;e[0]!==N?({label:a,error:t,helperText:s,className:u,type:h,...p}=N,e[0]=N,e[1]=t,e[2]=s,e[3]=a,e[4]=p,e[5]=u,e[6]=h):(t=e[1],s=e[2],a=e[3],p=e[4],u=e[5],h=e[6]);const C=u===void 0?"":u,k=h===void 0?"text":h,b=`
            block w-full rounded-lg border px-4 py-3 text-sm
            transition-all duration-200
            placeholder:text-gray-400
            focus:outline-none focus:ring-2 focus:ring-offset-0
            dark:placeholder:text-gray-500
            ${t?"border-red-300 bg-red-50 text-red-900 focus:border-red-500 focus:ring-red-500 dark:border-red-700 dark:bg-red-900/20 dark:text-red-200":"border-gray-300 bg-white text-gray-900 shadow-sm focus:border-[#d4af37] focus:ring-[#d4af37]/20 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:focus:border-[#b8941f] dark:focus:ring-[#b8941f]/20"}
            ${C}
        `;if(k==="textarea"){const g=p;let c;e[7]!==a||e[8]!==g?(c=a&&r.jsxs("label",{htmlFor:g.id,className:"mb-2 block text-sm font-semibold text-gray-700 dark:text-gray-300",children:[a,g.required&&r.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}),e[7]=a,e[8]=g,e[9]=c):c=e[9];const w=$,z=`${b} min-h-[100px] resize-y`,L=g;let x;e[10]!==w||e[11]!==z||e[12]!==L?(x=r.jsx("div",{className:"relative",children:r.jsx("textarea",{ref:w,className:z,...L})}),e[10]=w,e[11]=z,e[12]=L,e[13]=x):x=e[13];let m;e[14]!==t?(m=t&&r.jsxs("p",{className:"mt-2 flex items-center gap-1 text-sm font-medium text-red-600 dark:text-red-400",children:[r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})}),t]}),e[14]=t,e[15]=m):m=e[15];let f;e[16]!==t||e[17]!==s?(f=s&&!t&&r.jsx("p",{className:"mt-2 text-sm text-gray-500 dark:text-gray-400",children:s}),e[16]=t,e[17]=s,e[18]=f):f=e[18];let y;return e[19]!==c||e[20]!==x||e[21]!==m||e[22]!==f?(y=r.jsxs("div",{className:"w-full",children:[c,x,m,f]}),e[19]=c,e[20]=x,e[21]=m,e[22]=f,e[23]=y):y=e[23],y}const l=p;let o;e[24]!==l||e[25]!==a?(o=a&&r.jsxs("label",{htmlFor:l.id,className:"mb-2 block text-sm font-semibold text-gray-700 dark:text-gray-300",children:[a,l.required&&r.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}),e[24]=l,e[25]=a,e[26]=o):o=e[26];const v=$;let d;e[27]!==b||e[28]!==l||e[29]!==v||e[30]!==k?(d=r.jsx("div",{className:"relative",children:r.jsx("input",{ref:v,type:k,className:b,...l})}),e[27]=b,e[28]=l,e[29]=v,e[30]=k,e[31]=d):d=e[31];let i;e[32]!==t?(i=t&&r.jsxs("p",{className:"mt-2 flex items-center gap-1 text-sm font-medium text-red-600 dark:text-red-400",children:[r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})}),t]}),e[32]=t,e[33]=i):i=e[33];let n;e[34]!==t||e[35]!==s?(n=s&&!t&&r.jsx("p",{className:"mt-2 text-sm text-gray-500 dark:text-gray-400",children:s}),e[34]=t,e[35]=s,e[36]=n):n=e[36];let j;return e[37]!==o||e[38]!==d||e[39]!==i||e[40]!==n?(j=r.jsxs("div",{className:"w-full",children:[o,d,i,n]}),e[37]=o,e[38]=d,e[39]=i,e[40]=n,e[41]=j):j=e[41],j});R.displayName="Input";export{R as I};
