import { DataAsset } from '../../../../../core/modules/data-assets';
import { SharedProtectionPlanRepository } from '../../domain/repositories/shared-protection-plan-repository';
import { SharedMergingProcessRepository } from '../../domain/repositories/shared-merging-process-repository';
import { SharedPlanEventListener } from '../../domain/services/shared-plan-event-listener';
import { RevealSharedPlanDataUseCase } from './reveal-shared-plan-data-use-case';
import { SharedPlanMergeProcessView } from '../../domain/models/shared-plan-merge-process-view';
export interface MergeSharedProtectionPlanCallbacks {
    /**
     * Called once when the authentication step begins.
     * Convenience signal — the full method list and progress are on view.authenticationMethods.
     */
    onAuthenticationRequested?: () => void;
    /**
     * Called once when the permission step begins.
     * Convenience signal — the full moderator list and progress are on view.moderators.
     */
    onPermissionRequested?: () => void;
    /**
     * Called after each step/progress change.
     * The view carries all context: auth methods, moderators, progress, revealed assets.
     */
    onViewUpdate?: (view: SharedPlanMergeProcessView) => void;
    /** Called with the reconstructed assets when the process reaches REVEALED. Convenience — assets are also on view.revealedAssets. */
    onRevealed?: (assets: DataAsset[] | null) => void;
    onError?: (error: Error) => void;
}
export interface MergeSharedProtectionPlanDeps {
    planRepository: SharedProtectionPlanRepository;
    mergeRepository: SharedMergingProcessRepository;
    revealUseCase: RevealSharedPlanDataUseCase;
    eventListener: SharedPlanEventListener;
}
export declare class MergeSharedProtectionPlanUseCase {
    private readonly deps;
    private pendingAuthResolve;
    private pendingPermissionResolve;
    constructor(deps: MergeSharedProtectionPlanDeps);
    /**
     * Creates a new merge process for the given plan, registers it on the backend,
     * and persists it locally.
     * Returns a view pre-populated with the plan's auth methods and moderators.
     */
    initialize(planId: string): Promise<SharedPlanMergeProcessView>;
    /** Returns the current view for an existing process, or null if not found. */
    getView(processId: string): Promise<SharedPlanMergeProcessView | null>;
    /**
     * Run the orchestration from the process's current step.
     * Subscribes to plan events for the duration of the run and cleans up in a finally block.
     * All callbacks receive SharedPlanMergeProcessView — the internal domain model is never exposed.
     */
    run(processId: string, callbacks?: MergeSharedProtectionPlanCallbacks): Promise<void>;
    private runAuthenticationStep;
    private runPermissionStep;
    private runShareCollectionStep;
    private resolveInitialStep;
}
