import 'package:flutter_riverpod/flutter_riverpod.dart';

class AppConfig {
  final String apiBaseUrl;
  final String wsBaseUrl;
  final String livekitUrl;
  final String environment;

  const AppConfig({
    required this.apiBaseUrl,
    required this.wsBaseUrl,
    required this.livekitUrl,
    required this.environment,
  });

  factory AppConfig.development() => const AppConfig(
    apiBaseUrl: 'http://10.0.2.2:18000',
    wsBaseUrl: 'ws://10.0.2.2:18000',
    livekitUrl: 'ws://10.0.2.2:7880',
    environment: 'development',
  );

  factory AppConfig.production() => const AppConfig(
    apiBaseUrl: 'https://it0api.szaiai.com',
    wsBaseUrl: 'wss://it0api.szaiai.com',
    livekitUrl: 'ws://14.215.128.96:7880',
    environment: 'production',
  );
}

final appConfigProvider = Provider<AppConfig>((ref) {
  return AppConfig.production();
});
