/**
 * Project Mapping Wizard (T-026, T-027, T-028)
 *
 * After sync-setup validates credentials, walks the user through mapping
 * each workspace repo to an external project (GitHub/Jira/ADO).
 *
 * - Lists all workspace repos + root repo
 * - Offers "Select all" shortcut for monorepo scenarios
 * - Validates each mapping before writing
 * - Writes resolved mappings to workspace.repos[].sync
 *
 * @module cli/helpers/issue-tracker/project-mapping-wizard
 */
import type { WorkspaceConfig } from '../../../core/config/types.js';
export type MappingProvider = 'github' | 'jira' | 'ado';
export interface MappingTarget {
    github?: {
        owner: string;
        repo: string;
    };
    jira?: {
        projectKey: string;
    };
    ado?: {
        organization?: string;
        project: string;
    };
}
export interface RepoMapping {
    repoId: string;
    isRoot: boolean;
    target: MappingTarget;
    direction?: string;
}
export interface MappingWizardOptions {
    provider: MappingProvider;
    workspace: WorkspaceConfig;
    /** Authenticated GitHub username (for auto-detect) */
    authenticatedOwner?: string;
    /** Project path for git remote detection */
    projectPath?: string;
    /** Validate a GitHub repo exists. Return true if valid. */
    validateGitHub?: (owner: string, repo: string) => Promise<boolean>;
    /** Validate a JIRA project key. Return true if valid. */
    validateJira?: (projectKey: string) => Promise<boolean>;
    /** Validate an ADO project. Return true if valid. */
    validateAdo?: (project: string) => Promise<boolean>;
}
export interface DetectGitHubInput {
    repoName: string;
    gitRemoteUrl?: string;
    authenticatedOwner?: string;
}
/**
 * Auto-detect GitHub owner/repo from git remote URL or authenticated owner.
 * Pure function — no side effects, no prompts.
 */
export declare function detectGitHubMapping(input: DetectGitHubInput): {
    owner: string;
    repo: string;
} | null;
export interface MappingWizardResult {
    mappings: RepoMapping[];
    rootRepoSync?: MappingTarget;
}
/**
 * Run the project mapping wizard.
 *
 * Displays each workspace repo and asks user to map it to an external project.
 * Validates each mapping and returns the resolved mappings.
 */
export declare function runProjectMappingWizard(options: MappingWizardOptions): Promise<MappingWizardResult>;
/**
 * Apply mapping results to a workspace config object.
 * Writes sync targets into workspace.repos[].sync and workspace.rootRepo.
 */
export declare function applyMappingsToWorkspace(workspace: WorkspaceConfig, result: MappingWizardResult): WorkspaceConfig;
/**
 * Resolve the filesystem path for a workspace repo entry.
 * Uses path.resolve() which normalises separators per-OS (/ on POSIX, \ on Windows).
 */
export declare function getRepoPath(entry: {
    id: string;
    isRoot: boolean;
    name: string;
}, options: MappingWizardOptions): string | undefined;
//# sourceMappingURL=project-mapping-wizard.d.ts.map