/**
 * Migrate Workflow
 *
 * Handles migration of plugins between servers with version compatibility
 */
import { EventEmitter } from 'node:events';
import type { SourceRegistry } from '../core/sources/index.js';
import type { Plugin } from '../core/types/index.js';
/**
 * Migration check result for a plugin
 */
export interface MigrationCheck {
    pluginName: string;
    currentVersion: string;
    currentMcVersion?: string;
    targetMcVersion: string;
    compatible: boolean;
    latestCompatibleVersion?: string;
    requiresUpdate: boolean;
    downloadUrl?: string;
    status: 'compatible' | 'needs-update' | 'incompatible' | 'unknown';
    message?: string;
}
/**
 * Migration progress event
 */
export interface MigrateProgress {
    current: number;
    total: number;
    pluginName: string;
    phase: 'checking' | 'downloading' | 'copying' | 'done' | 'error';
    status: string;
    message?: string;
}
/**
 * Migration result
 */
export interface MigrateResult {
    sourceDir: string;
    targetDir: string;
    targetMcVersion: string;
    migrated: string[];
    updated: string[];
    skipped: string[];
    incompatible: string[];
    errors: Array<{
        pluginName: string;
        error: string;
    }>;
    duration: number;
    backupPath?: string;
}
/**
 * Migration options
 */
export interface MigrateOptions {
    sourceDir: string;
    targetDir: string;
    targetMcVersion: string;
    plugins?: Plugin[];
    sourceRegistry?: SourceRegistry;
    downloadUpdates?: boolean;
    createBackup?: boolean;
    backupDir?: string;
    skipIncompatible?: boolean;
    forceCopy?: boolean;
    dryRun?: boolean;
    onProgress?: (progress: MigrateProgress) => void;
}
/**
 * Migration workflow class
 */
export declare class MigrateWorkflow extends EventEmitter {
    private options;
    constructor(options: MigrateOptions);
    /**
     * Execute migration
     */
    migrate(): Promise<MigrateResult>;
    /**
     * Check compatibility of a plugin with target Minecraft version
     */
    private checkCompatibility;
    /**
     * Get source identifier from plugin config
     */
    private getSourceIdentifier;
    /**
     * Get migration preview
     */
    preview(): Promise<MigrationCheck[]>;
}
/**
 * Create a migration workflow
 */
export declare function createMigrateWorkflow(options: MigrateOptions): MigrateWorkflow;
//# sourceMappingURL=migrate.d.ts.map