/** * Auto-close behavior shared between `Menu` and `Menu.Sub`: * * - Closes on window blur, working around a Radix bug where submenus stay * open when the browser window loses focus * (https://github.com/radix-ui/primitives/issues/1441). * - Closes when any `useOverlay`-managed overlay (Modal, Sheet, Drawer, ...) * is pushed onto the stack while the menu is open, so the user only has * to dismiss the topmost layer. * * Menus themselves don't register with `visibleOverlays` (Radix has its own * dismiss layer); the hook just observes stack growth above the size * captured at open-time. * @internal */ export declare function useMenuAutoClose(open: boolean | undefined, setOpen: (open: boolean) => void): void;