import { useId, type InputHTMLAttributes } from 'react'
import { cn } from '../../lib/cn'
interface InputProps extends InputHTMLAttributes {
label: string
}
/**
* Labeled text input in the terminal idiom. The label is wired to the input via
* a generated id, so consumers (and tests) can query it by its accessible name.
*/
export default function Input({ label, id, className, ...props }: InputProps) {
const generatedId = useId()
const inputId = id ?? generatedId
return (