import{j as e,r as m}from"./vendor-react-wBh_31cN.js";import{d as a}from"./index-dNe6i2rS.js";import{L as g}from"./label-gPWmc6ow.js";function v({intent:t="default",className:d,children:r,...i}){return e.jsx("p",{"data-slot":"input-info",className:a("mt-1.5 text-xs",t==="error"?"text-destructive":"text-muted-foreground",d),...i,children:r})}function I({className:t,type:d,label:r,labelAction:i,optional:s,info:n,intent:o,id:x,...f}){const p=m.useId(),u=x||p,l=r||i||s||n,c=e.jsx("input",{id:u,type:d,"data-slot":"input",className:a("h-8 w-full min-w-0 rounded-lg border border-input bg-muted px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",!l&&t),"aria-invalid":o==="error"||void 0,...f});return l?e.jsxs("div",{className:a("flex flex-col gap-1.5",t),children:[(r||i||s)&&e.jsxs("div",{className:"flex items-center gap-1",children:[r&&e.jsx(g,{htmlFor:u,children:r}),s&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"(optional)"}),i]}),c,n&&e.jsx(v,{intent:o,children:n})]}):c}export{I,v as a};
