import * as React from 'react'; import { FloatingEvents } from '@floating-ui/react'; import { GenericHTMLProps } from '../../utils/types'; export declare function useMenuItem(params: useMenuItem.Parameters): useMenuItem.ReturnValue; export declare namespace useMenuItem { interface Parameters { /** * If `true`, the menu will close when the menu item is clicked. */ closeOnClick: boolean; /** * If `true`, the menu item will be disabled. */ disabled: boolean; /** * Determines if the menu item is highlighted. */ highlighted: boolean; /** * The id of the menu item. */ id: string | undefined; /** * The FloatingEvents instance of the menu's root. */ menuEvents: FloatingEvents; /** * The ref of the trigger element. */ ref?: React.Ref; /** * If `true`, the menu item will listen for mouseup events and treat them as clicks. */ treatMouseupAsClick: boolean; /** * A ref that is set to `true` when the user is using the typeahead feature. */ typingRef: React.RefObject; } interface ReturnValue { /** * Resolver for the root slot's props. * @param externalProps event handlers for the root slot * @returns props that should be spread on the root slot */ getRootProps: (externalProps?: GenericHTMLProps) => GenericHTMLProps; /** * The ref to the component's root DOM element. */ rootRef: React.RefCallback | null; } }