import type { ItemType, MenuItemType } from 'antd/es/menu/interface'; import type { LayoutProps, Tabbar } from '../types'; /** * 菜单操作hook * @param menu * @returns */ interface UseMenuReturn { navbar: MenuItemType[] | undefined; selectedNav: string[]; onSelectedNav: (info: { key: string; }) => void; activeNav: (key: string) => void; menu: ItemType[] | undefined; openKeys: string[]; selectedMenu: string[]; onSelectedMenu: (info: { key: string; }, subMenu?: ItemType[]) => void; onMenuOpenChange: (keys: string[]) => void; activeMenu: (key: string) => void; tabbar: Tabbar[]; selectedTabbar: string | undefined; onSelectTarbar: (key: string) => void; addTab: (info: string | { key?: string; label: string; }) => void; removeTab: (key?: string) => void; setOpenKey: (key: string | ((keys: string[]) => string[])) => void; } declare function useMenu(data: LayoutProps, collapsed: boolean): UseMenuReturn; export default useMenu;