import { ColdStorageService, ColdScanFilters, IOResponse, OperationProgressCallback, PlanColdShareData } from '../../safekey/domain/services/cold-storage-service';
import { DeviceShareInfo } from '../../protection-plan/domain/models/device-share-info';
export type { ColdScanFilters, IOResponse, OperationProgressCallback, PlanColdShareData };
export interface SafekeyDeviceInfo {
    freeSlots?: number;
    totalSlots: number;
    usagePercentage: number;
}
export interface SafekeyDeviceCallbacks {
    /** Called after connect completes — signal to show "press device button" UI. */
    onTouchRequired?: () => void;
    /** Called during the touch operation with IO progress (login attempts, timeout). */
    onProgress?: (io: IOResponse) => void;
    /** Called with computed device info once touch + getDeviceInfo succeed. */
    onDeviceInfo?: (info: SafekeyDeviceInfo) => void;
}
/**
 * Orchestrates the full SafeKey device session: connect → touch → device info.
 *
 * Stores the PIN internally so callers don't need to thread it through both steps.
 *
 * Vanilla usage:
 *   await useCase.connect(pin, {
 *       onTouchRequired: () => { ui.setState('TOUCH_DEVICE_BUTTON'); },
 *       onProgress: (io) => { ui.updateProgress(io); },
 *       onDeviceInfo: (info) => { ui.showDevice(info); },
 *   });
 *
 * React: use `useSafekeyDevice` — a thin wrapper over this class.
 */
export declare class SafekeyDeviceUseCase {
    private coldStorage;
    private _pin;
    constructor(coldStorage: ColdStorageService);
    /**
     * Full connect flow:
     *  1. Store pin + call coldStorage.connect()
     *  2. Fire onTouchRequired — show "press device button" UI
     *  3. Call coldStorage.touch() — blocks until user presses button
     *  4. Fetch device info and fire onDeviceInfo
     *
     * Returns computed device info on success.
     */
    connect(pin: string, callbacks?: SafekeyDeviceCallbacks): Promise<SafekeyDeviceInfo>;
    /** Disconnects from the device and clears the stored PIN. */
    disconnect(): Promise<void>;
    /**
     * Returns current device info, or undefined if no device is connected.
     * Call on mount to detect if a device is already inserted.
     */
    getDeviceInfo(): Promise<SafekeyDeviceInfo | undefined>;
    getDeviceId(): Promise<string | undefined>;
    getDevicePassword(): Promise<string | undefined>;
    collectShare(pin: string, filters: ColdScanFilters, onProgress?: OperationProgressCallback): Promise<any>;
    collectAllSharesPlansIds(pin: string, onProgress?: OperationProgressCallback): Promise<string[]>;
    collectAllPlanShares(pin: string, onProgress?: OperationProgressCallback): Promise<DeviceShareInfo[]>;
    distributeShare(data: PlanColdShareData, onProgress?: OperationProgressCallback): Promise<void>;
    private fetchDeviceInfo;
    private buildDeviceInfo;
}
