/// <reference types="vite/client" />

interface ImportMetaEnv {
  readonly VITE_API_URL?: string;
  readonly VITE_MEDIA_API_URL?: string;
  readonly VITE_MKDOCS_URL?: string;
  readonly VITE_DOMAIN?: string;
  readonly VITE_MKDOCS_SITE_PORT?: string;
}

interface ImportMeta {
  readonly env: ImportMetaEnv;
}

declare module 'grapesjs-tabs' {
  import { Plugin } from 'grapesjs';
  const plugin: Plugin;
  export default plugin;
}

declare module 'grapesjs-touch' {
  import { Plugin } from 'grapesjs';
  const plugin: Plugin;
  export default plugin;
}

declare module 'html5-qrcode' {
  export class Html5QrcodeScanner {
    constructor(
      elementId: string,
      config: { fps: number; qrbox: { width: number; height: number } },
      verbose: boolean,
    );
    render(
      onScanSuccess: (decodedText: string) => void,
      onScanFailure: (error: string) => void,
    ): void;
    clear(): Promise<void>;
  }
}
