'use client'; import { type ListBoxItemProps, Select as AriaSelect, type SelectProps as AriaSelectProps, SelectValue, type ValidationResult, type ListBoxProps } from 'react-aria-components/Select'; import {Button} from './Button'; import {DropdownItem, DropdownListBox} from './ListBox'; import {ChevronDown} from 'lucide-react'; import {Popover} from './Popover'; import {Label, FieldError, Description} from './Form'; import './Select.css'; export interface SelectProps extends Omit< AriaSelectProps, 'children' > { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); items?: Iterable; children: React.ReactNode | ((item: T) => React.ReactNode); } export function Select({ label, description, errorMessage, children, items, ...props }: SelectProps) { return ( {label && } {description && {description}} {errorMessage} {children} ); } export function SelectListBox(props: ListBoxProps) { return ; } export function SelectItem(props: ListBoxItemProps) { return ; }