import ProtectionPlanRepository from '../../../protection-plan/domain/repositories/protection-plan-repository';
import PlanConfigurationProcess from '../../../protection-plan/domain/models/configuration-process/plan-configuration-process';
import { DataAsset } from '../../../../../core/modules/data-assets';
import { GetPersonalProtectionPlanConfigurationProcessUseCase } from './get-plan-configuration-process-use-case';
import PlanConfigurationRepository from '../../../protection-plan/domain/repositories/plan-configuration-repository';
import { DeletePersonalProtectionPlanConfigurationProcessUseCase } from './delete-plan-configuration-process-use-case';
import { InitializeShieldShareUseCase } from './plan-shares/distribution/initialize-shield-share-use-case';
import { GenerateSharesUseCase } from './plan-shares/creation/generate-shares-use-case';
import { DistributeValidatorSharesUseCase } from './plan-shares/distribution/distribute-validator-shares-use-case';
import { DistributeBackupSharesUseCase } from './plan-shares/distribution/distribute-backup-shares-use-case';
import { DistributeMobileSharesUseCase } from './plan-shares/distribution/distribute-mobile-shares-use-case';
export interface ConfigurationProcessOrchestratorDeps {
    planRepo: ProtectionPlanRepository;
    getProcess: GetPersonalProtectionPlanConfigurationProcessUseCase;
    configRepo: PlanConfigurationRepository;
    deleteProcess: DeletePersonalProtectionPlanConfigurationProcessUseCase;
    initializeShieldShare: InitializeShieldShareUseCase;
    generateShares: GenerateSharesUseCase;
    distributeValidatorShares: DistributeValidatorSharesUseCase;
    distributeBackupShares: DistributeBackupSharesUseCase;
    distributeMobileShares: DistributeMobileSharesUseCase;
}
export interface StartConfigurationInput {
    planId: string;
    dataAssets: DataAsset[];
}
export interface RunConfigurationCallbacks {
    /** Called before a step begins executing */
    onStepStart?: (stepId: string, stepIndex: number, process: PlanConfigurationProcess) => void | Promise<void>;
    /** Called after a step finishes successfully */
    onStepComplete?: (stepId: string) => void | Promise<void>;
    /**
     * Called when user interaction is required (e.g. COLD_SHARES_DISTRIBUTION —
     * writing shares to a SafeKey device). The caller performs the work and
     * resolves the promise when finished. Receives the process so the caller
     * can access planColdShares for device work.
     */
    onManualActionRequired?: (stepId: string, process: PlanConfigurationProcess) => Promise<void>;
    /** Called when a step throws. The error is re-thrown after this callback. */
    onError?: (stepId: string, error: Error) => void;
}
/**
 * Orchestrates the full plan configuration lifecycle in a framework-agnostic way.
 *
 * Usage (vanilla TS):
 *   await orchestrator.start({ planId, dataAssets });
 *   await orchestrator.run(planId, {
 *       onStepStart: ({ id }) => console.log('Running', id),
 *       onManualActionRequired: async (stepId, process) => {
 *           // write cold shares to device(s), then resolve
 *       },
 *   });
 *
 * Usage (React): wrap `start` and `run` in useState / useRef — see the React hook.
 */
export declare class ConfigurationProcessOrchestratorUseCase {
    private deps;
    constructor(deps: ConfigurationProcessOrchestratorDeps);
    /**
     * Creates and persists a new PlanConfigurationProcess for the given plan.
     * Must be called before `run`.
     */
    start(input: StartConfigurationInput): Promise<void>;
    /**
     * Runs the configuration 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 that require manual user interaction (COLD_SHARES_DISTRIBUTION)
     * pause and await the `onManualActionRequired` callback before continuing.
     */
    run(planId: string, callbacks?: RunConfigurationCallbacks): Promise<void>;
    private executeStep;
}
