import { ActionRowBuilder, ButtonBuilder, StringSelectMenuBuilder, type SendableChannels } from "discord.js"; import type { ChoiceRequest } from "./base.js"; export declare function buildChoiceOptId(id: string, index: number): string; export declare function buildChoiceMenuId(id: string): string; export declare function buildChoiceUndoId(id: string): string; export declare function buildChoiceConfirmId(id: string): string; export declare function buildChoiceCancelId(id: string): string; export type ChoiceAction = { kind: "opt"; index: number; } | { kind: "menu"; } | { kind: "undo"; } | { kind: "confirm"; } | { kind: "cancel"; }; export declare function parseChoiceId(customId: string): { id: string; action: ChoiceAction; } | null; /** Button row(s) for ≤5 options. */ export declare function choiceButtonRows(req: ChoiceRequest, disabled?: boolean): ActionRowBuilder[]; /** Select menu for 6+ options. */ export declare function choiceMenuRow(req: ChoiceRequest, disabled?: boolean): ActionRowBuilder; export interface AwaitChoiceOpts { /** How long to wait for a selection before rejecting. */ timeoutMs: number; /** Test seam — defaults to setTimeout. */ delay?: (ms: number) => Promise; } /** * Post the question and resolve with the chosen option's `value`. Throws on * timeout (no choice made). Reversible choices honour `undoGraceMs` (recovery * ②); irreversible options require a 2-step confirm (recovery ①). */ export declare function awaitChoice(channel: SendableChannels, req: ChoiceRequest, opts: AwaitChoiceOpts): Promise;