/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import type { CodeFormatsToSupport } from './types';
type ScannerSize = {
    width: number;
    height: number;
};
type UseCodeScannerOptions = {
    enabled: boolean;
    elementId: string;
    formatsToSupport?: CodeFormatsToSupport;
    onScannerSizeChanged?: (size: ScannerSize) => void;
    onScanSuccess: (text: string) => void;
    onScanFailure?: () => void;
    onCameraStartFailure?: (error: unknown) => void;
};
export declare const DEFAULT_CODE_FORMATS: CodeFormatsToSupport;
export declare function getCodeScanBoxSize(width: number, height: number): {
    width: number;
    height: number;
};
export declare function scanQrVideoFrame(video: HTMLVideoElement, canvas: HTMLCanvasElement): string;
export declare function useCodeScanner({ enabled, elementId, formatsToSupport, onScannerSizeChanged, onScanSuccess, onScanFailure, onCameraStartFailure, }: UseCodeScannerOptions): {
    startScanFile: (file: File) => Promise<void>;
};
export {};
