import React from 'react'; import { cn } from '@/lib/utils'; interface SelectProps extends React.SelectHTMLAttributes { label?: string; error?: string; options: { value: string; label: string }[]; } export const Select = React.forwardRef( ({ className, label, error, options, id, ...props }, ref) => { // Generate a unique id for accessibility if not provided const selectId = id || (label ? `select-${label.toLowerCase().replace(/\s+/g, '-')}` : undefined); return (
{label && ( )} {error && (

{error}

)}
); } ); Select.displayName = 'Select';