import * as React from 'react'; import { Check, ChevronsUpDown } from 'lucide-react'; import { cn } from '@/lib/utils'; import { Button } from '@/components/ui/button'; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; export function Combobox({ items, value, onValueChange, }: { items: { value: string; label: string }[]; value: string; onValueChange: (value: string) => void; }) { const [open, setOpen] = React.useState(false); return ( No item found. {open && items.map((item) => ( { value = currentValue; onValueChange(value); setOpen(false); }} > {item.label} ))} ); }