declare module 'react-qr-scanner' {
    import { Component } from 'react';

    interface QRScannerProps {
        /** Delay between scans in milliseconds, or disable with `false` */
        delay?: number | false;
        /** Callback function triggered on scanning success */
        onScan?: (data: string | null) => void;
        /** Callback function triggered on scanning error */
        onError?: (error: Error) => void;
        /** Camera-facing mode ('user' for front, 'environment' for rear) */
        facingMode?: 'user' | 'environment';
        /** Enables legacy mode for scanning from files */
        legacyMode?: boolean;
        /** Toggles the visibility of the viewfinder UI */
        showViewFinder?: boolean;
        /** Custom styles for the scanner's container */
        style?: React.CSSProperties;
        /** Optional additional CSS class for the container */
        className?: string;
        /** Media constraints to customize video streams */
        constraints?: MediaTrackConstraints | { video: MediaTrackConstraints }; // Allow nested video object
        /** Optionally, invoke a specific camera device */
        videoConstraints?: Record<string, unknown>;
    }

    export default class QRScanner extends Component<QRScannerProps> {}
}