import '../data/firebase/models/firebase_config.dart'; /// Configuration class that holds application settings. /// /// This class contains environment-specific configuration values /// such as API base URL, Immich settings, logging settings, and Firebase configuration. class AppConfig { /// The base URL for API requests. final String apiBaseUrl; /// Whether logging is enabled in the application. final bool enableLogging; /// Immich server base URL (e.g., 'https://immich.example.com'). final String immichBaseUrl; /// Immich API key for authentication. final String immichApiKey; /// Whether Immich is enabled (if false, only Blossom will be available). final bool immichEnabled; /// Blossom server base URL (e.g., 'https://media.based21.com'). final String blossomServer; /// List of Nostr relay URLs for testing and production. final List nostrRelays; /// Firebase configuration for this environment. final FirebaseConfig firebaseConfig; /// Creates an [AppConfig] instance with the provided values. /// /// [apiBaseUrl] - The base URL for API requests. /// [enableLogging] - Whether logging should be enabled. /// [immichBaseUrl] - Immich server base URL. /// [immichApiKey] - Immich API key for authentication. /// [immichEnabled] - Whether Immich is enabled (if false, only Blossom will be available). /// [blossomServer] - Blossom server base URL. /// [nostrRelays] - List of Nostr relay URLs (e.g., ['wss://relay.example.com']). /// [firebaseConfig] - Firebase configuration for this environment. const AppConfig({ required this.apiBaseUrl, required this.enableLogging, required this.immichBaseUrl, required this.immichApiKey, required this.immichEnabled, required this.blossomServer, required this.nostrRelays, required this.firebaseConfig, }); @override String toString() { return 'AppConfig(apiBaseUrl: $apiBaseUrl, enableLogging: $enableLogging, ' 'immichBaseUrl: $immichBaseUrl, nostrRelays: ${nostrRelays.length}, ' 'firebaseConfig: $firebaseConfig)'; } @override bool operator ==(Object other) { if (identical(this, other)) return true; return other is AppConfig && other.apiBaseUrl == apiBaseUrl && other.enableLogging == enableLogging && other.immichBaseUrl == immichBaseUrl && other.immichApiKey == immichApiKey && other.nostrRelays.toString() == nostrRelays.toString() && other.firebaseConfig.enabled == firebaseConfig.enabled && other.firebaseConfig.firestoreEnabled == firebaseConfig.firestoreEnabled && other.firebaseConfig.storageEnabled == firebaseConfig.storageEnabled && other.firebaseConfig.authEnabled == firebaseConfig.authEnabled && other.firebaseConfig.messagingEnabled == firebaseConfig.messagingEnabled && other.firebaseConfig.analyticsEnabled == firebaseConfig.analyticsEnabled; } @override int get hashCode => apiBaseUrl.hashCode ^ enableLogging.hashCode ^ immichBaseUrl.hashCode ^ immichApiKey.hashCode ^ nostrRelays.hashCode ^ firebaseConfig.enabled.hashCode ^ firebaseConfig.firestoreEnabled.hashCode ^ firebaseConfig.storageEnabled.hashCode ^ firebaseConfig.authEnabled.hashCode ^ firebaseConfig.messagingEnabled.hashCode ^ firebaseConfig.analyticsEnabled.hashCode; }