import{C as e,ft as t,k as n,l as r,o as i,p as a,s as o,u as s,ut as c}from"./runtime-core.esm-bundler-DTXUv7Wx.js";var l={class:`flex flex-col gap-2`},u=[`for`],d={key:0,class:`text-danger`},f=[`id`,`type`,`value`,`placeholder`,`disabled`,`required`,`aria-invalid`,`aria-describedby`],p=[`id`],m=[`id`],h={__name:`Input`,props:{modelValue:{type:[String,Number],default:``},label:{type:String,default:``},hint:{type:String,default:``},error:{type:String,default:``},type:{type:String,default:`text`},placeholder:{type:String,default:``},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(h){let g=h,_=n(),v=i(()=>`in-${_}`),y=i(()=>g.hint?`hint-${_}`:void 0),b=i(()=>g.error?`err-${_}`:void 0),x=i(()=>[y.value,b.value].filter(Boolean).join(` `)||void 0);return(n,i)=>(e(),s(`div`,l,[h.label?(e(),s(`label`,{key:0,for:v.value,class:`text-[11px] font-bold uppercase tracking-eyebrow text-muted`},[a(t(h.label),1),h.required?(e(),s(`span`,d,` *`)):r(``,!0)],8,u)):r(``,!0),o(`input`,{id:v.value,type:h.type,value:h.modelValue,placeholder:h.placeholder,disabled:h.disabled,required:h.required,"aria-invalid":!!h.error,"aria-describedby":x.value,class:c([`w-full rounded-sm border bg-paper px-4 py-3 text-[15px] text-ink placeholder:text-ink-placeholder transition-colors duration-base focus:outline-none focus:border-brand disabled:opacity-50 disabled:cursor-not-allowed`,h.error?`border-danger`:`border-line`]),onInput:i[0]||=e=>n.$emit(`update:modelValue`,e.target.value)},null,42,f),h.hint&&!h.error?(e(),s(`p`,{key:1,id:y.value,class:`text-[13px] text-muted`},t(h.hint),9,p)):r(``,!0),h.error?(e(),s(`p`,{key:2,id:b.value,class:`text-[13px] text-danger`},t(h.error),9,m)):r(``,!0)]))}};export{h as t};