import { HookSubscriberInfo } from './subscriptions.js'; export interface MenuCallbackProperties { selectedIds: IdT[]; entityId: EntityIdT; permissions: string[]; supports: string[]; } export interface MenuClickHandlerProperties extends MenuCallbackProperties { formValues: FormValueT; } type AsyncCallbackProperty = (props: MenuCallbackProperties) => ReturnT | Promise; export type ContextMenuIcon = { [key in string]: string; }; export interface ContextMenu extends HookSubscriberInfo { icon?: ContextMenuIcon; } export interface ContextMenuItem { id: string; title: string; icon?: ContextMenuIcon; urls?: string[] | AsyncCallbackProperty; onClick?: (props: MenuClickHandlerProperties) => void; filter?: AsyncCallbackProperty; access?: string; formDefinitions?: object[] | AsyncCallbackProperty; children?: ContextMenuItem[]; } export {};