import type { ClientMessageConditions, ClientMessageContext } from "../../conditions/context/clientMessage.js"; import type { State } from "../../state/state.js"; import type { Command } from "../../command.js"; import type { BaseActionDefinition } from "../base.js"; import type { CollectionActionDefinition, CollectionConditionsResult, CollectionContext } from "../collection/collection.js"; import { DragContext } from "./context.js"; import { DragEndActionTemplate, DragEndActionDefinition } from "./end.js"; import { DragStartActionDefinition, DragStartActionTemplate } from "./start.js"; /** * @category Action definitions */ export interface DragActionTemplate { name: string; /** * Definition for event related to "dragStart" */ start: DragStartActionTemplate; /** * Definition for event related to "dragEnd". * Only considered after passing previous "start" action. * * Define as array, if your action can end in multiple places. */ end: DragEndActionTemplate | DragEndActionTemplate[]; } /** * @ignore */ export declare class DragActionDefinition implements CollectionActionDefinition> { private template; name: string; start: DragStartActionDefinition; end: DragEndActionDefinition[]; constructor(template: DragActionTemplate); setupContext(): DragContext; teardownContext(context: CollectionContext>): void; checkPrerequisites(messageContext: ClientMessageContext, actionContext: CollectionContext>): boolean; checkConditions(test: ClientMessageConditions, messageContext: ClientMessageContext, actionContext: CollectionContext>): CollectionConditionsResult>; getCommand(messageContext: ClientMessageContext, actionContext: CollectionContext>): Command; hasSuccessfulSubActions(context: CollectionContext>): boolean; hasFinished(context: CollectionContext>): boolean; } /** * @category Action definitions */ export declare function defineDragAction(template: DragActionTemplate): DragActionDefinition;