import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{$ as t}from"./vendor-charts-iXlq6Rne.js";import{_ as n}from"./vendor-flow-IzlrcDx6.js";import{rn as r}from"./index-HkVQGc9M.js";var i=e(t(),1),a=n(),o=(0,i.forwardRef)(({className:e,label:t,error:n,hint:i,id:o,...s},c)=>{let l=o||t?.toLowerCase().replace(/\s+/g,`-`);return(0,a.jsxs)(`div`,{className:`space-y-1.5`,children:[t&&(0,a.jsx)(`label`,{htmlFor:l,className:`block text-sm font-medium text-[var(--color-text-primary)]`,children:t}),(0,a.jsx)(`input`,{ref:c,id:l,className:r(`flex h-10 w-full rounded-lg border bg-[var(--color-surface)] px-3 py-2 text-sm`,`text-[var(--color-text-primary)] placeholder:text-[var(--color-text-muted)]`,`transition-colors duration-[var(--transition-fast)]`,`focus:outline-none focus:ring-2 focus:ring-offset-1`,n?`border-[var(--color-error)] focus:ring-[var(--color-error)]/30`:`border-[var(--color-border)] focus:ring-[var(--color-primary)]/30 focus:border-[var(--color-primary-light)]`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-slate-50 dark:disabled:bg-slate-800/50`,e),"aria-invalid":!!n,"aria-describedby":n?`${l}-error`:i?`${l}-hint`:void 0,...s}),n&&(0,a.jsx)(`p`,{id:`${l}-error`,className:`text-xs text-[var(--color-error)] font-medium`,role:`alert`,children:n}),i&&!n&&(0,a.jsx)(`p`,{id:`${l}-hint`,className:`text-xs text-[var(--color-text-muted)]`,children:i})]})});o.displayName=`Input`;export{o as t};