"use client" import * as React from "react" import { Check, ChevronsUpDown } from "lucide-react" import { cn } from "./utils" import { Button } from "./button" import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, css, sx } from '@hanzo/ui' import { Popover, PopoverContent, PopoverTrigger, } from "@hanzo/ui" export interface ComboboxOption { value: string label: string } export interface ComboboxProps { options: ComboboxOption[] value?: string onChange?: (value: string) => void placeholder?: string emptyText?: string } export function Combobox({ options, value, onChange, placeholder = "Select option...", emptyText = "No option found.", }: ComboboxProps) { const [open, setOpen] = React.useState(false) const [searchValue, setSearchValue] = React.useState("") return ( {emptyText} {options.map((option) => ( { onChange?.(currentValue === value ? "" : currentValue) setOpen(false) }} > {option.label} ))} ) }