import type { DesktopApi } from "@qjclaw/shared-types"
import { mockDesktopApi } from "./mock-desktop-api"

declare global {
  interface Window {
    qjcDesktop?: DesktopApi
    qjcSmokeEnabled?: boolean
  }
}

export const desktopApi = window.qjcDesktop ?? mockDesktopApi
export const isMockDesktopApi = !window.qjcDesktop
export const smokeEnabled = window.qjcSmokeEnabled === true
