/// <reference types="react" />
import type { PeripheralConnectionRow, PeripheralDevice, PeripheralUsage, PhysicalDeviceSelectState, PrintUsageState, RuntimeConnectionState } from '../types';
interface UsePeripheralRuntimeParams {
    /** 当前卡片的行模型，接口事实和物理运行态已经在 row 中隔离。 */
    row: PeripheralConnectionRow;
    getAppInstance: () => any;
    getText: (key: string) => string;
    /** 连接动作得到物理设备状态后回写父级 row。 */
    onPhysicalChange: (rowId: number, physical?: PeripheralDevice) => void;
    /** usage 选择写入 SQLite 后回写父级 row。 */
    onUsageChange: (rowId: number, usage?: PeripheralUsage) => void;
}
export declare const usePeripheralRuntime: ({ row, getAppInstance, getText, onPhysicalChange, onUsageChange, }: UsePeripheralRuntimeParams) => {
    runtimeState: RuntimeConnectionState | undefined;
    physicalSelect: PhysicalDeviceSelectState | undefined;
    printUsageSelect: PrintUsageState | undefined;
    isRuntimeSubmitting: boolean;
    setPhysicalSelect: import("react").Dispatch<import("react").SetStateAction<PhysicalDeviceSelectState | undefined>>;
    setPrintUsageSelect: import("react").Dispatch<import("react").SetStateAction<PrintUsageState | undefined>>;
    handleConnectPeripheral: (this: any, targetRow: PeripheralConnectionRow, auto?: any) => Promise<void>;
    handleDisconnectPeripheral: (this: unknown, targetRow: PeripheralConnectionRow) => Promise<void>;
    handleOpenUsageSelect: (this: unknown, targetRow: PeripheralConnectionRow) => void;
    handleSelectPeripheralUsage: (this: unknown, usage: PeripheralUsage) => Promise<void>;
    connectSelectedPhysicalDevice: (this: unknown, targetRow: PeripheralConnectionRow, physicalDevice: PeripheralDevice) => Promise<void>;
};
export {};
