import {
Select as AriaSelect,
SelectValue,
Popover,
ListBox,
Button,
} from 'react-aria-components'
import { cx } from 'class-variance-authority'
import { MaterialIcon } from '../Icons/MaterialIcon'
import { Typography } from '../Typography'
import { SelectItem } from './SelectItem'
import { SelectFilter } from './SelectFilter'
import type { SelectProps } from './types'
import styles from './select.module.css'
export function Select({
name,
label,
items,
isDisabled,
icon,
itemIcon,
enableFiltering,
...props
}: SelectProps) {
if (enableFiltering) {
return (
)
}
const iconColor = isDisabled ? 'Icon/Interactive/Disabled' : 'Icon/Default'
return (
{items.map((item, idx) => (
{typeof item === 'object' ? (
{item.label}
) : (
{item.toString()}
)}
))}
)
}