// File: lib/firebase_options.dart
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
    show defaultTargetPlatform, TargetPlatform, kIsWeb;

class DefaultFirebaseOptions {
  static FirebaseOptions get currentPlatform {
    if (kIsWeb) {
      throw UnsupportedError(
        'DefaultFirebaseOptions have not been configured for web',
      );
    }
    switch (defaultTargetPlatform) {

    // =======================================================
    // 🤖 CONFIGURAZIONE ANDROID (Compilata con i tuoi dati JSON)
    // =======================================================
      case TargetPlatform.android:
        return const FirebaseOptions(
          apiKey: 'AIzaSyB9f420xu5fu_aaaFgvRYMQVS2L8Ddudbo', // Presa dal tuo JSON
          appId: '1:1060927868658:android:84884a85cd60c4e8084a6b', // Presa dal tuo JSON
          messagingSenderId: '1060927868658',
          projectId: 'cid-app-sincro',
          storageBucket: 'cid-app-sincro.firebasestorage.app',
          databaseURL: 'https://cid-app-sincro-default-rtdb.europe-west1.firebasedatabase.app',
        );

    // =======================================================
    // 🍎 CONFIGURAZIONE iOS (Compilata con i tuoi dati PLIST)
    // =======================================================
      case TargetPlatform.iOS:
        return const FirebaseOptions(
          apiKey: 'AIzaSyBDEXTqdXbwNVeK4yy8m9uMwk1xzeSYWJ8',
          appId: '1:1060927868658:ios:be05f4b773c220e3084a6b',
          messagingSenderId: '1060927868658',
          projectId: 'cid-app-sincro',
          storageBucket: 'cid-app-sincro.firebasestorage.app',
          databaseURL: 'https://cid-app-sincro-default-rtdb.europe-west1.firebasedatabase.app',
          iosBundleId: 'com.example.cidApp',
        );

      case TargetPlatform.macOS:
        throw UnsupportedError('MacOS not configured');
      case TargetPlatform.windows:
        throw UnsupportedError('Windows not configured');
      case TargetPlatform.linux:
        throw UnsupportedError('Linux not configured');
      default:
        throw UnsupportedError(
          'DefaultFirebaseOptions are not supported for this platform.',
        );
    }
  }
}