/**
 * Import GitHub Repository Use Case
 *
 * Orchestrates importing a GitHub repository: validates the URL, checks auth,
 * detects duplicates by remoteUrl/upstreamUrl, checks push access, and either
 * clones directly or auto-forks when the user lacks push access.
 */
import type { Repository } from '../../../domain/generated/output.js';
import type { IGitHubRepositoryService, CloneOptions, ForkOptions } from '../../ports/output/services/github-repository-service.interface.js';
import type { IGitPrService } from '../../ports/output/services/git-pr-service.interface.js';
import type { IRepositoryRepository } from '../../ports/output/repositories/repository-repository.interface.js';
import { AddRepositoryUseCase } from './add-repository.use-case.js';
export interface ImportGitHubRepositoryInput {
    /** GitHub URL or shorthand (e.g. "owner/repo") */
    url: string;
    /** Override clone destination directory */
    dest?: string;
    /** Default base directory for clones (from settings) */
    defaultCloneDir?: string;
    /** Options for the clone subprocess (e.g. progress callback) */
    cloneOptions?: CloneOptions;
    /** Options for fork operations (e.g. progress callback) */
    forkOptions?: ForkOptions;
}
export declare class ImportGitHubRepositoryUseCase {
    private readonly gitHubService;
    private readonly repositoryRepo;
    private readonly addRepositoryUseCase;
    private readonly gitPrService;
    constructor(gitHubService: IGitHubRepositoryService, repositoryRepo: IRepositoryRepository, addRepositoryUseCase: AddRepositoryUseCase, gitPrService: IGitPrService);
    execute(input: ImportGitHubRepositoryInput): Promise<Repository>;
    /**
     * Direct clone path — user has push access to the repository.
     */
    private cloneDirect;
    /**
     * Fork-and-clone path — user lacks push access, so we auto-fork first.
     */
    private forkAndClone;
    /**
     * Resolve the clone destination, handling the case where the directory already exists.
     *
     * If the destination exists and is a git repo with the same remote origin → git pull and
     * signal that clone can be skipped. If it's a different remote or not a git repo → suffix
     * with a random short hash so the clone proceeds to a new directory.
     */
    private resolveCloneDestination;
    private resolveBasePath;
    /**
     * Compare two remote URLs for equivalence, normalizing case, .git suffix, and protocol.
     */
    private isSameRemote;
}
//# sourceMappingURL=import-github-repository.use-case.d.ts.map