/**
 * WizardRouter — declarative flow pipelines + overlay stack.
 *
 * Two layers:
 *   Flow cursor    — linear pipeline of screens, advanced with next()
 *   Overlay stack  — interrupts (outage, auth-expired, etc.) that push/pop
 *
 * The visible screen is: top of overlay stack if non-empty, otherwise the flow cursor.
 *
 * Adding a flow screen = append to a pipeline array.
 * Adding an overlay = call pushOverlay() from anywhere.
 * No switch statements, no hardcoded transitions in business logic.
 */
import type { WizardSession } from '../../lib/wizard-session.js';
import type { WizardStore } from './store.js';
import { Screen, Flow, type FlowEntry } from './flows.js';
export { Screen, Flow };
export type { FlowEntry };
/** Screens that interrupt flows as overlays */
export declare enum Overlay {
    Outage = "outage",
    Snake = "snake",
    Mcp = "mcp-overlay",
    Slack = "slack-overlay",
    Logout = "logout-overlay",
    Login = "login-overlay"
}
/** Union of all screen names */
export type ScreenName = Screen | Overlay;
export declare class WizardRouter {
    private flow;
    private flowName;
    private overlays;
    constructor(flowName?: Flow);
    /**
     * Resolve which screen should be active based on session state.
     * Walks the flow pipeline, skipping hidden entries and completed entries,
     * returns the first incomplete screen.
     */
    resolve(session: WizardSession): ScreenName;
    /** The screen that should be rendered right now. */
    get activeScreen(): ScreenName;
    /** The name of the active flow. */
    get activeFlow(): Flow;
    /** Whether an overlay is currently active. */
    get hasOverlay(): boolean;
    /**
     * Push an overlay that interrupts the current flow.
     * The flow resumes when the overlay is dismissed via popOverlay().
     */
    pushOverlay(overlay: Overlay): void;
    /**
     * Dismiss the topmost overlay. The flow screen underneath resumes.
     */
    popOverlay(): void;
    /**
     * Find the index of the entry that resolve() would currently land on.
     * Returns flow.length when every entry is complete (i.e. on the trailing
     * fallback screen).
     */
    private activeIndex;
    /**
     * Whether the user can go back from the current screen.
     *
     * Walks the flow backwards from the active entry through entries that
     * the user has already completed (regardless of whether they're still
     * "shown" — RegionSelect is a good example: once a region is picked,
     * `show` returns false but the step still happened and is revertible).
     *
     * Returns true if it finds a previously-completed entry with a `revert`
     * defined. Returns false the moment it hits a completed entry without a
     * revert — those act as a wall (e.g. Run, which would be destructive
     * to undo).
     *
     * Overlays disable back-nav so users dismiss the overlay first.
     */
    canGoBack(session: WizardSession): boolean;
    /**
     * Step back one decision. Calls the most recent revertible entry's
     * `revert` callback so the router naturally re-resolves to that screen
     * on the next render. Returns true if a revert fired.
     *
     * Reverts that return `false` are treated as no-ops (nothing meaningful
     * to undo at that step) and the walk continues further back.
     */
    goBack(session: WizardSession, store: WizardStore): boolean;
    /**
     * Direction hint for screen transitions.
     */
    private _lastDirection;
    get lastNavDirection(): 'push' | 'pop' | null;
}
