import{q as B,i as D}from"./vendor-mini-lit-CpUQub-j.js";import{b as s,n as E}from"./vendor-lit-B2r-dKc0.js";import"./app-session-runtime-CeFJDILJ.js";const J=B(({type:l="text",size:o="md",value:r="",placeholder:d="",label:n="",error:e="",disabled:c=!1,required:a=!1,name:p="",autocomplete:$="",min:u,max:m,step:x,inputRef:i,onInput:f,onChange:b,onKeyDown:g,onKeyUp:v,className:h=""})=>{const y={sm:"h-8 px-3 py-1 text-sm",md:"h-9 px-3 py-1 text-sm md:text-sm",lg:"h-10 px-4 py-1 text-base"},C="flex w-full min-w-0 rounded-md border bg-transparent text-foreground shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium",w="placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground",k="focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",I="dark:bg-input/30",q=e?"border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40":"border-input",z="disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",j=t=>{f?.(t)},A=t=>{b?.(t)};return s`
			<div class="flex flex-col gap-1.5 ${h}">
				${n?s`
							<label class="text-sm font-medium text-foreground">
								${n} ${a?s`<span class="text-destructive">${D("*")}</span>`:""}
							</label>
						`:""}
				<input
					type="${l}"
					class="${C} ${y[o]} ${w} ${k} ${I} ${q} ${z}"
					.value=${r}
					placeholder="${d}"
					?disabled=${c}
					?required=${a}
					?aria-invalid=${!!e}
					name="${p}"
					autocomplete="${$}"
					min="${u??""}"
					max="${m??""}"
					step="${x??""}"
					@input=${j}
					@change=${A}
					@keydown=${g}
					@keyup=${v}
					${i?E(i):""}
				/>
				${e?s`<span class="text-sm text-destructive">${e}</span>`:""}
			</div>
		`});export{J as I};
