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, SelectFilterProps } from "./types"
import styles from "./select.module.css"
import { useState } from "react"
import { InputLabel } from "../InputLabel"
export function Select({
name,
label,
items,
isDisabled,
icon,
itemIcon,
popoverWidth,
...props
}: SelectProps | SelectFilterProps) {
const [isOpen, setIsOpen] = useState(false)
if (props.enableFiltering) {
return (
)
}
const iconColor = isDisabled ? "Icon/Interactive/Disabled" : "Icon/Default"
return (
{items.map((item, idx) => (
{item.label}
))}
)
}