import { WatchEventItem } from '../../../../utils/watch';
import { BookingTicketImpl } from '../../index';
import Tasks from '../../../../utils/task';
interface ScanResult {
    type: ScanResultType;
    value: string;
    data?: {
        [key: string]: any;
    };
}
declare enum ScanResultType {
    Scanner = "scanner",
    NFC = "nfc",
    NativeScanner = "nativeScanner"
}
export default class Scan {
    private solution;
    private watchKey;
    private listenerConfig;
    constructor(solution: BookingTicketImpl, watchKey: string);
    /**
     * 初始化外设扫码结果监听
     */
    initPeripheralsListener(): void;
    /**
     * 处理扫码事件
     * @param eventKey 事件key
     * @param value 扫码结果
     */
    handleScan(result: {
        type: string;
        value: string;
    }): void;
    /**
     * 生成uuid
     * @returns uuid
     */
    generateUuid(): string;
    /**
     * 添加扫码信息监听
     * @param watchKey 监听的key
     * @param event 事件
     */
    addListener(event: WatchEventItem, scanCallback?: (result: ScanResult) => Promise<any>): {
        remove: () => void;
    };
    /**
     * 移除扫码信息监听
     * @param watchKey 监听的key
     * @param event 事件
     */
    removeListener(event: WatchEventItem): void;
    /**
     * 移除所有监听
     */
    removeAllListeners(): void;
    /**
     * 启用所有监听
     */
    enableAllListeners(): void;
    /**
     * 禁用所有监听，并清空任务执行队列
     */
    disableAllListeners(): void;
    /**
     * 清空监听对应的任务执行队列，不传入eventKey则清空所有监听对应的任务执行队列
     * @param eventKey 事件key
     */
    clearTaskQueue(eventKey?: string): void;
    /**
     * 获取监听配置
     * @param eventKey 事件key
     * @returns 监听配置
     */
    getListenerConfig(eventKey: string): {
        scanCallback?: ((result: ScanResult) => Promise<any>) | undefined;
        task: Tasks;
    } | undefined;
    /**
     * 扫码任务执行函数
     * @param args 参数
     */
    scanTaskAction(...args: any[]): Promise<void>;
}
export {};
