import type { Project } from '../../actions/sanity/projects.js';
import type { Logger } from '../logger.js';
import type { ScopeType } from '../types.js';
export declare const BACK: unique symbol;
export type Back = typeof BACK;
/** Thrown when the user picks "Cancel" in a prompt. Cores translate it to a clean result. */
export declare class CancelledError extends Error {
    constructor(message?: string);
}
/**
 * Ask where a new Blueprint should go.
 * Returns the chosen directory, or null to use the current one.
 * @throws CancelledError when the user cancels.
 */
export declare function promptForInitLocation(currentDir: string): Promise<string | null>;
export declare function promptForBlueprintType(): Promise<string>;
/**
 * Fetches organizations and prompts the user to pick one (if multiple).
 * Returns the selected organization along with its projects.
 */
export declare function promptForOrganization({ token, knownOrganizationId, logger, allowBack, }: {
    token: string;
    knownOrganizationId?: string;
    logger: Logger;
    allowBack?: boolean;
}): Promise<{
    organization: {
        id: string;
        name: string;
    };
    projects: Project[];
    wasPrompted: boolean;
} | Back>;
/**
 * Asks the user whether to scope a Blueprint to an organization or a project.
 */
export declare function promptForScope({ allowBack, hasProjects, message, }?: {
    allowBack?: boolean;
    hasProjects?: boolean;
    message?: string;
}): Promise<ScopeType | Back>;
/** Offers a recovery path after the selected scope cannot be read. */
export declare function promptForScopeRecovery(): Promise<'exit' | 'retry'>;
/**
 * Prompts the user to pick a project from a pre-fetched list of projects.
 * Use after promptForOrganization when the user chose project scope.
 */
export declare function promptForProjectInOrg({ projects, knownProjectId, logger, allowBack, }: {
    projects: Project[];
    knownProjectId?: string;
    logger?: Logger;
    allowBack?: boolean;
}): Promise<{
    projectId: string;
    displayName: string;
} | Back>;
/**
 * Prompt the user for a Stack after scope has been determined.
 * Can create a new Stack or select an existing one.
 */
export declare function promptForStack({ scopeType, scopeId, token, logger, allowBack, suggestedName, }: {
    scopeType: ScopeType;
    scopeId: string;
    token: string;
    logger: Logger;
    allowBack?: boolean;
    /** Prefilled name for a new Stack, usually the project directory name. */
    suggestedName?: string;
}): Promise<{
    stackId: string;
    name: string;
} | Back>;
/**
 * Full wizard: Organization -> Scope -> Project (if project-scoped) -> Stack.
 * Supports back-navigation between steps.
 */
export declare function runScopeAndStackWizard({ token, knownOrganizationId, knownProjectId, logger, suggestedStackName, }: {
    token: string;
    knownOrganizationId?: string;
    knownProjectId?: string;
    logger: Logger;
    suggestedStackName?: string;
}): Promise<{
    scopeType: ScopeType;
    scopeId: string;
    displayName: string;
    stackId: string;
    stackName: string;
}>;
