/**
 * Centralized configuration for tests
 * This file provides a single source of truth for environment variables and configuration
 */
export class Config {
  // URLs
  static get stagingUrl(): string {
    return process.env.UPSKILL_STAGING_URL || 'https://wordpress-974670-5399585.cloudwaysapps.com';
  }

  static get loginUrl(): string {
    return `${this.stagingUrl}/community-login/`;
  }

  static get dashboardUrl(): string {
    return `${this.stagingUrl}/hvac-dashboard/`;
  }

  static get generateCertificatesUrl(): string {
    return `${this.stagingUrl}/generate-certificates/`;
  }

  static get certificateReportsUrl(): string {
    return `${this.stagingUrl}/certificate-reports/`;
  }

  static get createEventUrl(): string {
    return `${this.stagingUrl}/manage-event/`;
  }

  // Test credentials
  static get testTrainer(): { username: string; password: string } {
    return {
      username: 'test_trainer',
      password: 'Test123!',
    };
  }

  // UI wait times
  static get defaultTimeout(): number {
    return 5000;
  }

  static get shortWait(): number {
    return 1000;
  }

  static get mediumWait(): number {
    return 2000;
  }

  static get longWait(): number {
    return 5000;
  }

  // Screenshot settings
  static get screenshotPath(): string {
    return 'test-results/screenshots';
  }
}