import { useState } from "react" import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, } from "@/components/ui/command" import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover" import { Button } from "@/components/ui/button" import { Check, ChevronsUpDown } from "lucide-react" import { cn } from "@/lib/utils" type Props = { types: any[] value: string onChange: (val: string) => void } export function ComboboxPricePlanType({ types, value, onChange }: Props) { const [open, setOpen] = useState(false) const selected = types.find((item) => item.id === value) return ( No type found. {types.map((item) => ( { onChange(item.id) setOpen(false) }} > {item.pricePlanTypeName} ))} ) }