import 'package:flutter_dotenv/flutter_dotenv.dart';

enum Flavor { local, demo, dev }

class AppConfig {
  static late Flavor flavor;

  static String get envFileName => '.env.${flavor.name}';

  static Future<void> init(Flavor f) async {
    flavor = f;
    await dotenv.load(fileName: envFileName);
  }

  static String get apiBaseUrl => dotenv.env['API_BASE_URL'] ?? '';
  static String get storageBaseUrl => dotenv.env['STORAGE_BASE_URL'] ?? '';
}
