"use client" import { Check, ChevronsUpDown } from "lucide-react" import { Button } from "@/components/ui/button" import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem } from "@/components/ui/command" import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover" import { cn } from "@/lib/utils" import { useState } from "react" type Option = { key: string, label: string, } export function Combox({options}: {options: Option[]}) { const [open, setOpen] = useState(false) const [currentKey, setCurrentKey] = useState(null) return ( No option found. {options.map((option) => ( { setCurrentKey(option.key) setOpen(false) }} > {option.label} ))} ) }