import * as React from "react"; import classNames from "classnames"; import { AriaListBoxOptions, useListBox, useListBoxSection, useOption } from "react-aria"; import type { ListState } from "react-stately"; import { CheckboxCircleChecked } from "@faulty/gdq-icons/icons/CheckboxCircleChecked"; import type { Node } from "@react-types/shared"; import { Stack } from "../../Stack/Stack"; import { Text } from "../../Text/Text"; import styles from "./DropdownListBox.module.css"; interface ListBoxProps extends AriaListBoxOptions { listBoxRef?: React.RefObject; state: ListState; emptyState?: React.ReactNode; } export function DropdownListBox(props: ListBoxProps) { let ref = React.useRef(null); let { listBoxRef = ref, state, emptyState = } = props; let { listBoxProps } = useListBox(props, state, listBoxRef); const visibleItems = [...state.collection].map((item) => item.type === "section" ? ( ) : (