interface Window {
  eventSource: EventSource
  existLoading: boolean
  requests: any[]
  tokenRefreshing: boolean
  unique: number
  /** teacher-electron 注入，仅在桌面客户端内嵌题库页时存在 */
  teacherApi?: {
    startSfu: () => Promise<{ port: number; already?: boolean }>
    stopSfu: () => Promise<void>
    /** 可选传入班级学员列表与班级名称；名称用于教师端共享窗口标题「{名称} - 屏幕共享」。 */
    openScreenShareWindow: (
      classStudentRows?: unknown[],
      className?: string,
    ) => Promise<void>
    /** 打开学员屏幕监控独立窗口（teacher-electron） */
    openStudentScreenMonitorWindow?: (
      classStudentRows?: unknown[],
      className?: string,
    ) => Promise<void>
    setShareClassStudentsListener?: (
      cb: ((rows: unknown[]) => void) | null,
    ) => void
  }
}

interface Option {
  label: any
  value: any
}

declare module '*.json'
