///
import { Items } from './utils';
interface MenuButtonSubscription {
id: string;
}
export interface MenuButtonAPI {
subscribe: (data: MenuButtonSubscription) => void;
openMenu: (activeItem: Items.First | Items.Last | Items.None) => void;
toggleMenu: () => void;
data: {
ariaControls: string | null;
ariaExpanded: boolean | undefined;
};
}
export declare const MenuButtonAPI: {
Provider: {
(props: {
value: MenuButtonAPI;
children?: string | number | boolean | {} | import("react").ReactElement import("react").ReactElement | null) | (new (props: any) => import("react").Component)> | import("react").ReactNodeArray | import("react").ReactPortal | import("react").ReactNode[] | null | undefined;
}): JSX.Element;
displayName?: string | undefined;
};
consume: () => MenuButtonAPI;
};
export declare const MenuButtonAPIProvider: {
(props: {
value: MenuButtonAPI;
children?: string | number | boolean | {} | import("react").ReactElement import("react").ReactElement | null) | (new (props: any) => import("react").Component)> | import("react").ReactNodeArray | import("react").ReactPortal | import("react").ReactNode[] | null | undefined;
}): JSX.Element;
displayName?: string | undefined;
};
export declare const useMenuButtonAPI: () => MenuButtonAPI;
interface MenuListSubscription {
id: string;
}
export interface MenuListAPI {
subscribe: (data: MenuListSubscription) => void;
setActiveItem: (item: Exclude) => void;
search: (value: string) => void;
closeMenu: () => void;
data: {
isSearching: boolean;
activeItemId: string | undefined;
hidden: boolean | undefined;
ariaLabelledBy: string | null;
ariaActiveDescendant: string | undefined;
};
}
export declare const MenuListAPI: {
Provider: {
(props: {
value: MenuListAPI;
children?: string | number | boolean | {} | import("react").ReactElement import("react").ReactElement | null) | (new (props: any) => import("react").Component)> | import("react").ReactNodeArray | import("react").ReactPortal | import("react").ReactNode[] | null | undefined;
}): JSX.Element;
displayName?: string | undefined;
};
consume: () => MenuListAPI;
};
export declare const MenuListAPIProvider: {
(props: {
value: MenuListAPI;
children?: string | number | boolean | {} | import("react").ReactElement import("react").ReactElement | null) | (new (props: any) => import("react").Component)> | import("react").ReactNodeArray | import("react").ReactPortal | import("react").ReactNode[] | null | undefined;
}): JSX.Element;
displayName?: string | undefined;
};
export declare const useMenuListAPI: () => MenuListAPI;
export interface SubscribedMenuItem {
id: string;
disabled: boolean;
text: string;
}
export interface MenuItemAPI {
subscribe: (data: SubscribedMenuItem) => void;
focus: (id: string) => void;
unFocus: () => void;
close: () => void;
data: {
activeItemId: string | null;
};
}
export declare const MenuItemAPI: {
Provider: {
(props: {
value: MenuItemAPI;
children?: string | number | boolean | {} | import("react").ReactElement import("react").ReactElement | null) | (new (props: any) => import("react").Component)> | import("react").ReactNodeArray | import("react").ReactPortal | import("react").ReactNode[] | null | undefined;
}): JSX.Element;
displayName?: string | undefined;
};
consume: () => MenuItemAPI;
};
export declare const MenuItemAPIProvider: {
(props: {
value: MenuItemAPI;
children?: string | number | boolean | {} | import("react").ReactElement import("react").ReactElement | null) | (new (props: any) => import("react").Component)> | import("react").ReactNodeArray | import("react").ReactPortal | import("react").ReactNode[] | null | undefined;
}): JSX.Element;
displayName?: string | undefined;
};
export declare const useMenuItemAPI: () => MenuItemAPI;
export {};