/**
 * @file global.d.ts - Global type declarations for the Rapid Workplace application.
 * Extends the Window interface with the runtime configuration object injected by public/config.js at page load.
 */

export {};

declare global {
  interface Window {
    /** Runtime configuration injected by public/config.js and frozen at startup */
    __APP_CONFIG__?: {
      /** Display name of the deploying organization */
      COMPANY_NAME: string;
      /** Base URL for the IWS5 backend RESTful API */
      IWS5_API_URL: string;
      /** Feature flag: enables RWP Companion desktop app integration (scan insert, image cleanup) */
      ENABLE_RWP_COMPANION: string;
      /** Feature flag: enables LPNU-specific digital signature capabilities for work items */
      ENABLE_LPNU_WORK_ITEM_SIGNAGE: string;
      /** Returns a list of accepted certificate issuers for LPNU-specific digital signage */
      LPNU_WORK_ITEM_SIGNAGE_CERTIFICATE_ISSUERS: () => Promise<string[]>;
    };
  }
}
