import PlanConfigurationProcess from '../../../../../protection-plan/domain/models/configuration-process/plan-configuration-process';
import PlanShare from '../../../../../protection-plan/domain/models/plan-share';
import { SafekeyDeviceUseCase } from '../../../../../../../safekey/application/safekey-device-use-case';
import { DistributeColdShareUseCase } from './distribute-cold-share-use-case';
export type ColdDistributionStep = 'CONNECT_DEVICE' | 'CONNECTING_DEVICE' | 'TOUCH_DEVICE_BUTTON' | 'WRITING_DATA' | 'CONNECT_ERROR' | 'ERROR';
export interface ColdDistributionProcessCallbacks {
    /**
     * Called at the start of each beneficiary. Resolve the returned Promise
     * with the device PIN when the user submits it. The process pauses
     * here — step transitions to CONNECTING_DEVICE once the PIN is provided.
     */
    onConnectDevice: (share: PlanShare, index: number, total: number) => Promise<string>;
    /** Fired on every step transition */
    onStepChange?: (step: ColdDistributionStep) => void;
    /** IO write progress (0–100) during the distributeShare operation */
    onWriteProgress?: (progress: number | undefined) => void;
    /** PIN validation timeout progress (0–100) during the touch() wait */
    onConnectTimeout?: (progress: number | undefined) => void;
    /** Called after each beneficiary's share is successfully written */
    onBeneficiaryComplete?: (share: PlanShare, index: number) => void;
    /** Called on error; isConnectError distinguishes device vs write failures */
    onError?: (error: Error, isConnectError: boolean) => void;
}
/**
 * Runs cold-share distribution in an interactive, step-by-step manner.
 * Uses a while loop to find the next undistributed share so that calling
 * `run()` again after a failure naturally resumes from where it left off.
 *
 * Vanilla TS usage:
 *   await coldProcess.run(process, {
 *       onConnectDevice: async (share, i, total) => promptUserForPin(share),
 *       onStepChange: step => console.log(step),
 *   });
 *
 * React: wire `onConnectDevice` to a useState pause pattern and expose
 * `submitPin` — see the React hook.
 */
export declare class ColdSharesDistributionProcessUseCase {
    private safekey;
    private distributeColdShare;
    constructor(safekey: SafekeyDeviceUseCase, distributeColdShare: DistributeColdShareUseCase);
    run(process: PlanConfigurationProcess, callbacks: ColdDistributionProcessCallbacks): Promise<void>;
}
