/** Normalizes an umbrella action discriminator and dispatches its handler. Missing or unknown operations return UNKNOWN_SUBACTION. */ import type { ActionResult } from "../types/components.js"; export type SubactionParameters = Record | undefined; export type SubactionHandler = (context: TContext) => ActionResult | Promise; export type SubactionHandlerMap = { [key in TSubaction]: SubactionHandler; }; /** The primary discriminator is action; subaction, op, operation, and verb are accepted aliases. Owners may specify a different key when action names a nested choice. */ export declare const CANONICAL_SUBACTION_KEY: "action"; /** Discriminator keys in lookup order; the primary key takes precedence. */ export declare const DEFAULT_SUBACTION_KEYS: readonly string[]; export declare function normalizeSubaction(value: unknown): string | undefined; export declare function readSubaction(parameters: SubactionParameters, options: { allowed: readonly TSubaction[]; keys?: readonly string[]; aliases?: Partial>; defaultValue?: TSubaction; }): TSubaction | undefined; export declare function dispatchSubaction(subaction: TSubaction | undefined, handlers: SubactionHandlerMap, context: TContext): Promise;