import { type ReactNode } from "react"
import { cn } from "@/lib/utils"
export function SelectControl({
ariaLabel,
value,
onChange,
children,
className,
}: {
ariaLabel: string
value: string
onChange: (value: string) => void
children: ReactNode
className?: string
}) {
return (
<select
aria-label={ariaLabel}
value={value}
onChange={(event) => onChange(event.target.value)}
className={cn(
"h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 py-1 text-sm transition-colors outline-none 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 dark:bg-input/30",
className,
)}
>
{children}
</select>
)
}