import 'dart:io';

import 'package:firebase_core/firebase_core.dart';
import 'package:real_estate_mobile/config/app_config.dart';

class FirebaseConfig {
  static FirebaseOptions get currentOptions {
    switch (AppConfig.flavor) {
      case Flavor.dev:
        return Platform.isIOS ? _devIos : _devAndroid;
      case Flavor.demo:
        return Platform.isIOS ? _demoIos : _demoAndroid;
      case Flavor.local:
        return Platform.isIOS ? _localIos : _localAndroid;
    }
  }

  // ── Dev (Android) ──
  static const _devAndroid = FirebaseOptions(
    apiKey: 'AIzaSyAwb_9fc7n9gbN_IQqWeYRkHSSykzVHCyc',
    appId: '1:703616926518:android:4342b796fbabb690fca997',
    messagingSenderId: '703616926518',
    projectId: 'real-estate-2d71e',
    storageBucket: 'real-estate-2d71e.firebasestorage.app',
  );

  // ── Dev (iOS) ──
  static const _devIos = FirebaseOptions(
    apiKey: 'AIzaSyD67KPio-70XW_yGjrRUyq9ejdZoZA1rmE',
    appId: '1:703616926518:ios:301cac94994fbdc3fca997',
    messagingSenderId: '703616926518',
    projectId: 'real-estate-2d71e',
    storageBucket: 'real-estate-2d71e.firebasestorage.app',
    iosBundleId: 'com.requestn.realEstateMobile.dev',
  );

  // ── Demo (Android) ──
  static const _demoAndroid = FirebaseOptions(
    apiKey: 'AIzaSyAwb_9fc7n9gbN_IQqWeYRkHSSykzVHCyc',
    appId: '1:703616926518:android:270639d6887d2cb4fca997',
    messagingSenderId: '703616926518',
    projectId: 'real-estate-2d71e',
    storageBucket: 'real-estate-2d71e.firebasestorage.app',
  );

  // ── Demo (iOS) ──
  static const _demoIos = FirebaseOptions(
    apiKey: 'AIzaSyD67KPio-70XW_yGjrRUyq9ejdZoZA1rmE',
    appId: '1:703616926518:ios:2d2f7d163774722dfca997',
    messagingSenderId: '703616926518',
    projectId: 'real-estate-2d71e',
    storageBucket: 'real-estate-2d71e.firebasestorage.app',
    iosBundleId: 'com.requestn.realEstateMobile.demo',
  );

  // ── Local (Android) ──
  static const _localAndroid = FirebaseOptions(
    apiKey: 'AIzaSyAwb_9fc7n9gbN_IQqWeYRkHSSykzVHCyc',
    appId: '1:703616926518:android:2eb242f07b174c25fca997',
    messagingSenderId: '703616926518',
    projectId: 'real-estate-2d71e',
    storageBucket: 'real-estate-2d71e.firebasestorage.app',
  );

  // ── Local (iOS) ──
  static const _localIos = FirebaseOptions(
    apiKey: 'AIzaSyD67KPio-70XW_yGjrRUyq9ejdZoZA1rmE',
    appId: '1:703616926518:ios:15652d299f9f2d7ffca997',
    messagingSenderId: '703616926518',
    projectId: 'real-estate-2d71e',
    storageBucket: 'real-estate-2d71e.firebasestorage.app',
    iosBundleId: 'com.requestn.realEstateMobile.local',
  );
}
