import type { BookingTicketHandle } from '../types';
import type { GlobalScanHostBridge } from '../utils/createGlobalScanHostBridge';
export interface ScanResultPayload {
    code?: string;
    data?: string;
}
export interface UseSalesSdkGlobalScanListenerOptions {
    enabled: boolean;
    isActive: boolean;
    bookingTicket: BookingTicketHandle | null;
    /** 每次扫码时读取最新 bridge（uiHosts / cart 可能已更新） */
    bridgeFactory: () => GlobalScanHostBridge | undefined;
    /** 返回 app.pubsub；缺失时不订阅 */
    getPubsub?: () => {
        subscribe?: (event: string, cb: (payload: ScanResultPayload) => void) => void;
        unsubscribe?: (event: string, cb: (payload: ScanResultPayload) => void) => void;
    } | null | undefined;
}
/**
 * 订阅原生扫码 pubsub，在回调里调用 OS handleGlobalScanCode(code, bridge)。
 *
 * @example
 * ```tsx
 * useSalesSdkGlobalScanListener({
 *   enabled: enableGlobalScanListener,
 *   isActive,
 *   bookingTicket,
 *   bridgeFactory: () => createGlobalScanHostBridge({ ... }),
 *   getPubsub: () => app?.pubsub,
 * });
 * ```
 */
export declare function useSalesSdkGlobalScanListener(options: UseSalesSdkGlobalScanListenerOptions): void;
