import { IAction } from "../_types/IAction"; import { IActionBinding } from "../_types/IActionBinding"; import { IBindingCreator } from "../_types/IBindingCreator"; import { TPureAction } from "../_types/TPureAction"; import { IContextFolderAction } from "./contextFolders/_types/IContextFolderAction"; import { IContextActionTransformer } from "./_types/IContextActionTransformer"; import { IContextItemData } from "./_types/IContextItemData"; import { IContextMenuItemData } from "./_types/IContextMenuItemData"; import { contextMenuAction } from "./contextMenuAction"; /** * Creates an action that conforms to all constraints of a proper action * @param actionInput The data to construct the action from * @returns The created action */ export declare function createContextAction< /** The input data type */ I, /** The result data type */ O = never, /** The parent actions types (union of parents) */ P extends IAction | void = void, /** The possible resulting bindings of this action */ K extends P extends IAction ? IActionBinding> : void = never, /** The folder to show the item in */ F extends IContextFolderAction = typeof contextMenuAction, /** The create binding function, which may want to specify generic types for more elaborate interfaces */ CB = IBindingCreator & (P extends void ? unknown : P)>, /** The remaining functions specified on the object */ EXTRAS = unknown>(actionInput: { /** The name of the action */ name: string; /** The parent actions of this action */ parents?: P[]; /** The core transformer of the action */ core: IContextActionTransformer; /** A custom binding creator in case generic types are needed */ createBinding?: CB; /** The item to show in the context menu */ contextItem?: IContextMenuItemData["item"] | IContextItemData; /** * The root action for which to override the context item, if all its bindings originate from this action. * Will automatically override any ancestor overrides too (overrides specified by our ancestors). */ override?: IAction | null; /** Whether to prevent adding the count category to the item, defaults to false */ preventCountCategory?: boolean; /** The folder that the action should appear in, defaults to the context menu (no folder) */ folder?: F; /** Extra data to set on the created action */ extras?: EXTRAS; }): /** The action as well as an interface to create bindings for this action with */ IAction & (P extends void ? unknown : P)> & (EXTRAS extends never ? unknown : EXTRAS) & { createBinding: CB; }; //# sourceMappingURL=createContextAction.d.ts.map