import MergingProcess from '../../../protection-plan/domain/models/merging-process/merging-process';
import MergingProcessRepository from '../../../protection-plan/domain/repositories/merging-process-repository';
import { CollectValidatorSharesUseCase } from './plan-shares/collection/collect-validator-shares-use-case';
import { CollectBackupSharesUseCase } from './plan-shares/collection/collect-backup-shares-use-case';
export interface MergeProcessOrchestratorDeps {
    mergeRepo: MergingProcessRepository;
    collectValidatorShares: CollectValidatorSharesUseCase;
    collectBackupShares: CollectBackupSharesUseCase;
}
export interface RunMergeCallbacks {
    /** Called before a step begins executing */
    onStepStart?: (stepId: string, process: MergingProcess) => void | Promise<void>;
    /** Called after a step finishes successfully */
    onStepComplete?: (stepId: string) => void | Promise<void>;
    /**
     * Called when user interaction is required (e.g. COLLECT_COLD_PLAN_SHARES — reading
     * shares from a SafeKey device, or COLLECT_MOBILE_PLAN_SHARES — waiting for
     * beneficiaries to release their shares). The caller performs the work and resolves
     * the promise when finished.
     */
    onManualActionRequired?: (stepId: string, process: MergingProcess) => Promise<void>;
    /** Called when a step throws. The error is re-thrown after this callback. */
    onError?: (stepId: string, error: Error) => void;
}
/**
 * Orchestrates the full merge process lifecycle in a framework-agnostic way.
 *
 * Runs the sequential merge steps:
 *   ACTIVATE_TRIGGERS → COLLECT_VALIDATOR_SHARE
 *   → [COLLECT_MOBILE_PLAN_SHARES] → [COLLECT_COLD_PLAN_SHARES] → COLLECT_MA_PLAN_SHARES
 *
 * Steps in brackets are optional (depend on plan configuration).
 * Manual steps pause and await `onManualActionRequired` before continuing.
 *
 * Usage (vanilla TS):
 *   await orchestrator.run(planId, {
 *       onManualActionRequired: async (stepId, process) => {
 *           if (stepId === 'COLLECT_COLD_PLAN_SHARES') {
 *               // connect device, collect cold shares, then resolve
 *           }
 *           if (stepId === 'COLLECT_MOBILE_PLAN_SHARES') {
 *               // send release request, wait for shares, then resolve
 *           }
 *       },
 *   });
 *
 * Usage (React): use `useMergePersonalProtectionPlan` — a thin wrapper over `MergePersonalProtectionPlanUseCase`.
 */
export declare class MergePersonalProtectionPlanOrchestratorUseCase {
    private deps;
    constructor(deps: MergeProcessOrchestratorDeps);
    /**
     * Runs the merge process step by step until completion.
     * Fetches the process fresh from the repo at each iteration so that it
     * can safely be retried after a failure by calling `run` again.
     *
     * Steps requiring manual user interaction pause and await `onManualActionRequired`.
     * After that callback resolves, the orchestrator marks the step complete and continues.
     */
    run(planId: string, callbacks?: RunMergeCallbacks): Promise<void>;
    private executeStep;
}
