'use client'; import {ChevronDown} from 'lucide-react'; import React from 'react'; import { ComboBox as AriaComboBox, type ComboBoxProps as AriaComboBoxProps, ComboBoxValue, ListBox, type ListBoxItemProps, type ValidationResult } from 'react-aria-components/ComboBox'; import {Description, FieldError, FieldGroup, Input, Label} from './Field'; import {DropdownItem, DropdownSection, type DropdownSectionProps} from './ListBox'; import {Popover} from './Popover'; import {composeTailwindRenderProps} from './utils'; import {FieldButton} from './FieldButton'; export interface ComboBoxProps extends Omit< AriaComboBoxProps, 'children' > { label?: string; description?: string | null; errorMessage?: string | ((validation: ValidationResult) => string); placeholder?: string; children: React.ReactNode | ((item: T) => React.ReactNode); } export function ComboBox({ label, description, errorMessage, children, items, ...props }: ComboBoxProps) { return ( {props.selectionMode === 'multiple' && ( )} {description && {description}} {errorMessage} {children} ); } export function ComboBoxItem(props: ListBoxItemProps) { return ; } export function ComboBoxSection(props: DropdownSectionProps) { return ; }