import { createPromptCommandOutput } from "#setup/cli/index.js";
import { type VercelCaptureFailure } from "#setup/primitives/index.js";
import { z } from "zod";
import type { ProjectResolution } from "./project-resolution.js";
import type { Prompter } from "./prompter.js";
import type { ResolvedVercelProjectSpec } from "./state.js";
declare const VercelTeamListEntrySchema: z.ZodObject<{
    name: z.ZodString;
    slug: z.ZodString;
    current: z.ZodBoolean;
}, z.core.$strip>;
type VercelTeamListEntry = z.infer<typeof VercelTeamListEntrySchema>;
declare const VercelProjectListEntrySchema: z.ZodObject<{
    name: z.ZodString;
    id: z.ZodString;
}, z.core.$strip>;
type VercelProjectListEntry = z.infer<typeof VercelProjectListEntrySchema>;
declare const VercelProjectReferenceSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
}, z.core.$strip>;
type VercelProjectReference = z.infer<typeof VercelProjectReferenceSchema>;
export declare function unresolvedProject(): ProjectResolution;
/**
 * Runs a network reach behind a section-like spinner so the user sees the CLI
 * is working, not hung. The spinner clears whether the work resolves or throws,
 * and degrades to nothing when the prompter has no spinner (headless/test).
 */
export declare function withNetworkSpinner<T>(prompter: Prompter, message: string, task: () => Promise<T>): Promise<T>;
/** Resolves the linked project id from a resolution, if any. */
export declare function projectIdFromResolution(project: ProjectResolution): string | undefined;
/** Lists the Vercel scopes available to the current CLI user. */
export declare function listTeams(projectRoot: string): Promise<VercelTeamListEntry[]>;
/** Lists Vercel projects available under an explicit team or personal scope. */
export declare function listProjects(projectRoot: string, team: string): Promise<VercelProjectListEntry[]>;
/** Resolves one project by exact name or id through the Vercel API. */
export declare function resolveProjectByNameOrId(projectRoot: string, team: string, projectNameOrId: string): Promise<VercelProjectReference | null>;
export declare function assertNewProjectNameAvailable(projectRoot: string, team: string, projectName: string): Promise<void>;
/**
 * Throws the login action. When the underlying `vercel whoami` failure is
 * known, its diagnostic is folded into the reason: without it the agent only
 * ever hears "log in", even when the real fault is a missing CLI or a transient
 * API error and the user is already authenticated.
 */
export declare function requireVercelLogin(failure?: VercelCaptureFailure): never;
/**
 * Ensures Vercel authentication before any provisioning. `vercel whoami` exits
 * non-zero when not logged in; any other failure (a missing CLI, a transient
 * API error) is surfaced verbatim rather than mislabeled as a login problem.
 */
export declare function requireAuth(projectRoot: string, prompter?: Prompter): Promise<void>;
/**
 * Non-throwing auth probe: whether the Vercel CLI has a logged-in user. Used
 * where authentication changes a decision (e.g. adopting an existing link)
 * rather than being a precondition to enforce.
 */
export declare function isVercelAuthenticated(projectRoot: string): Promise<boolean>;
/**
 * Resolves a passed team slug, or the current scope when unset, to a concrete
 * slug so every provisioning command can pass an explicit `--scope`.
 */
export declare function resolveTeam(projectRoot: string, team: string | undefined): Promise<string>;
/**
 * Validates a passed team slug against the account's teams, failing fast.
 *
 * When the slug is provided and the account's teams are listable, an unknown
 * slug throws so the run stops before any project mutation. When Vercel returns
 * an empty list, validation does not block and the later scoped command
 * surfaces any real scope error itself.
 *
 * `prompter` is accepted so callers can pass it uniformly across the team
 * resolution helpers; it is unused now that an invalid slug throws.
 */
export declare function validateTeam(prompter: Prompter, projectRoot: string, team: string | undefined): Promise<void>;
/**
 * Picks the Vercel team (scope). A passed slug is validated and resolved; with
 * zero or one team the current scope is used without prompting; otherwise the
 * user filters and chooses from the list with a single-selection picker.
 */
export declare function pickTeam(prompter: Prompter, projectRoot: string, presetTeam: string | undefined): Promise<string>;
/**
 * A picked Vercel project. `exists` distinguishes a project the user selected
 * from the existing list (link it) from a name they typed because none exist
 * yet (create it), so the caller can build the right `new` vs `existing` plan.
 */
export interface ArgsPickedProject {
    /** Project slug: an existing project's name, or a name to create. */
    project: string;
    /** True for a selected existing project; false for a typed-in name to create. */
    exists: boolean;
}
/** Picks an existing project under a team, or a name to create when none exist. */
export declare function pickProject(prompter: Prompter, projectRoot: string, team: string): Promise<ArgsPickedProject>;
/** Returns a project name for a new Vercel project, prompting when the default exists. */
export declare function pickNewProjectName(prompter: Prompter, projectRoot: string, team: string, defaultProjectName: string): Promise<string>;
/**
 * Ensures the concrete project exists (creating it for a `new` plan) and links
 * this directory to it. Pure executor: it acts on a fully-resolved spec and
 * never prompts for a team or project. Returns whether the link succeeded.
 */
export declare function linkProject(prompter: Prompter, projectRoot: string, spec: ResolvedVercelProjectSpec, onOutput: ReturnType<typeof createPromptCommandOutput>): Promise<boolean>;
export {};
