import type BarcodeReaderType from "dynamsoft-javascript-barcode"; import { type RefObject } from "react"; declare global { interface Window { BarcodeReader: typeof BarcodeReaderType; } } export declare function useScanner(rootRef: RefObject, canvasRef: RefObject, onRead: (barcode: string) => void): { devices: BarcodeReaderType.VideoDeviceInfo[]; error: { message: string; icon: string; } | null; isLoading: boolean; setNextDevice: () => void; };