import type { CellActionConfirmHandler, CellActionParams, GridAction } from '../../../types/cell-action.types'; /** * Runs one action: confirm, invoke, settle. * * Split out of both the renderer and `GridCore` because all three entry points * into an action — a button, a menu item, and (in future) a keyboard shortcut — * must treat it identically. A confirmation that only guarded the button, or a * busy state only the menu applied, is the kind of divergence that ships. * * DOM-aware but grid-agnostic: it knows how to disable the control it was * invoked from, and nothing about rows, columns or the event bus. * * @packageDocumentation */ /** Class marking a control whose async handler is still in flight. */ export declare const ACTION_BUSY_CLASS = "pg-action--busy"; /** What one invocation needs to run to completion. */ export interface CellActionRequest { readonly action: GridAction; /** Params for this action, with `node` and `event` populated. */ readonly params: CellActionParams; /** Replaces the built-in confirmation dialog for this column. */ readonly confirmHandler?: CellActionConfirmHandler; /** * The control that was activated. Carries the busy state while an async * handler runs, and is re-enabled when it settles. */ readonly trigger?: HTMLElement | null; /** Called once the user has confirmed, immediately before `onClick` runs. */ readonly onRun?: () => void; /** Called with whatever an `onClick` promise rejected with. */ readonly onError?: (error: unknown) => void; } /** Applies or clears the busy state on a control. */ export declare function setActionBusy(trigger: HTMLElement | null | undefined, busy: boolean): void; /** * Confirms and runs an action. * * Every dismissal route — Cancel, Escape, a click on the backdrop — abandons * the action silently, so `onClick` never runs on a "no". * * An `onClick` returning a promise keeps the control busy until it settles and * routes a rejection to {@link CellActionRequest.onError} instead of leaving an * unhandled rejection. A control removed from the DOM mid-flight (its row * repainted, scrolled out of the viewport) is simply not re-enabled — the check * is `isConnected`, not a stored flag, so a recycled element is never touched. * * @returns `true` when the action ran, `false` when the confirmation was * dismissed. */ export declare function runCellAction(request: CellActionRequest): Promise; //# sourceMappingURL=action-executor.d.ts.map