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

interface Window {
  __IAM_CONFIG__?: {
    apiUrl: string;
    postLoginPath?: string;
  };
  __USER_MANAGEMENT_BRANDING__?: {
    organizationName: string;
    appName: string;
    moduleBasePath: string;
    backToAppPath?: string;
    backToAppLabel?: string;
  };
}

interface ImportMetaEnv {
  readonly VITE_API_URL: string;
  readonly VITE_BASE_API_URL: string;
  readonly VITE_GOOGLE_MAPS_API_KEY?: string;
  readonly VITE_TOKEN_REFRESH_INTERVAL_MINUTES?: string;
  /** PostHog project token. Absent = observability disabled (see lib/posthog.ts). */
  readonly VITE_POSTHOG_KEY?: string;
  /** Self-hosted PostHog instance URL. */
  readonly VITE_POSTHOG_HOST?: string;
}

interface ImportMeta {
  readonly env: ImportMetaEnv;
}
