import * as _nextui_org_system from '@nextui-org/system'; import { HTMLNextUIProps, PropGetter, SharedSelection } from '@nextui-org/system'; import { AriaMenuProps } from '@react-types/menu'; import { AriaMenuOptions } from '@react-aria/menu'; import { MenuVariantProps, SlotsToClasses, MenuSlots } from '@nextui-org/theme'; import { TreeState } from '@react-stately/tree'; import { ReactRef } from '@nextui-org/react-utils'; import { ReactNode } from 'react'; import { MenuItemProps } from './menu-item.js'; import 'react/jsx-runtime'; import './use-menu-item.js'; import './base/menu-item-base.js'; import '@react-types/shared'; import '@nextui-org/aria-utils'; import 'tailwind-variants'; interface Props { /** * Ref to the DOM node. */ ref?: ReactRef; /** * The controlled state of the menu. */ state?: TreeState; /** * The menu aria props. */ menuProps?: AriaMenuOptions; /** * The menu items variant. */ variant?: MenuItemProps["variant"]; /** * The menu items color. */ color?: MenuItemProps["color"]; /** * Whether to hide the check icon when the items are selected. * @default false */ hideSelectedIcon?: boolean; /** * Provides content to include a component in the top of the table. */ topContent?: ReactNode; /** * Provides content to include a component in the bottom of the table. */ bottomContent?: ReactNode; /** * Whether to not display the empty content when there are no items. * @default false */ hideEmptyContent?: boolean; /** * Provides content to display when there are no items. * @default "No items." */ emptyContent?: React.ReactNode; /** * Whether to disable the items animation. * @default false */ disableAnimation?: boolean; /** * Whether the menu should close when the menu item is selected. * @default true */ closeOnSelect?: MenuItemProps["closeOnSelect"]; /** * Classname or List of classes to change the classNames of the element. * if `className` is passed, it will be added to the base slot. * * @example * ```ts * * ``` */ classNames?: SlotsToClasses; /** * The menu items classNames. */ itemClasses?: MenuItemProps["classNames"]; /** * Handler that is called when the selection changes. */ onSelectionChange?: (keys: SharedSelection) => void; } type UseMenuProps = Props & Omit, keyof AriaMenuProps> & Omit, "onSelectionChange"> & MenuVariantProps; declare function useMenu(props: UseMenuProps): { Component: _nextui_org_system.As; state: TreeState; variant: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined; color: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined; disableAnimation: boolean; onClose: (() => void) | undefined; topContent: ReactNode; bottomContent: ReactNode; closeOnSelect: boolean | undefined; className: string | undefined; itemClasses: SlotsToClasses<"base" | "title" | "description" | "wrapper" | "selectedIcon" | "shortcut"> | undefined; getBaseProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getListProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; hideEmptyContent: boolean; hideSelectedIcon: boolean; getEmptyContentProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; }; type UseMenuReturn = ReturnType; export { UseMenuProps, UseMenuReturn, useMenu };