import { MaybePromise } from '@mtcute/core'; import { MessageContext } from './context/message.js'; import { DispatcherParams, Dispatcher } from './dispatcher.js'; import { UpdateFilter } from './filters/index.js'; import { UpdateState } from './state/update-state.js'; /** * Action for the wizard scene. * * `Next`: Continue to the next registered step * (or exit, if this is the last step) * * `Stay`: Stay on the same step * * `Exit`: Exit from the wizard scene * * You can also return a `number` to jump to that step */ export declare enum WizardSceneAction { Next = "next", Stay = "stay", Exit = "exit" } interface WizardInternalState { $step?: number; } /** * Wizard is a special type of Dispatcher * that can be used to simplify implementing * step-by-step scenes. */ export declare class WizardScene extends Dispatcher { private _steps; private _defaultState; constructor(name: string, params?: Omit); static for: never; static child: never; static scene: never; setDefaultState(defaultState: State): void; /** * Get the total number of registered steps */ get totalSteps(): number; /** * Go to the Nth step */ goToStep(state: UpdateState, step: number): Promise; /** * Skip N steps */ skip(state: UpdateState, count?: number): Promise; /** * Filter that will only pass if the current step is `step` */ static onNthStep(step: number): UpdateFilter; /** * Filter that will only pass if the current step is the one after last one added */ onCurrentStep(): UpdateFilter; /** * Add a step to the wizard */ addStep(handler: (msg: MessageContext, state: UpdateState) => MaybePromise): void; } export {};