import { Listbox, ListboxButton, ListboxOptions, ListboxOption, Transition, } from "@headlessui/react"; import { CheckIcon, ChevronDownIcon } from "lucide-react"; import { twMerge } from "tailwind-merge"; export type SelectValue = string | number; export type SelectOption = { label: string; value: SelectValue }; interface ListDropdownProps { options: SelectOption[]; onChange: (val: SelectValue) => void; placeholder?: string; value?: SelectValue; id?: string; className?: string; } export const Select = ({ onChange, options, placeholder, value, id, className, }: ListDropdownProps) => { const selectedOption = options.find( (option: SelectOption) => option.value === value, ) || { label: placeholder || "", value: "" }; return (