import { SearchIcon, XIcon } from 'lucide-react' import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from '@/components/ui/input-group' import { cn } from '@/lib/utils' interface SearchInputProps { value: string placeholder: string ariaLabel: string clearLabel: string onValueChange: (value: string) => void className?: string inputClassName?: string clearButtonClassName?: string } export function SearchInput ({ value, placeholder, ariaLabel, clearLabel, onValueChange, className, inputClassName, clearButtonClassName }: SearchInputProps) { const hasSearch = value.trim().length > 0 return ( { onValueChange(event.target.value) }} placeholder={placeholder} aria-label={ariaLabel} className={inputClassName} /> {hasSearch ? ( { onValueChange('') }} title={clearLabel} aria-label={clearLabel} > ) : null} ) }