import 'package:flutter_bloc/flutter_bloc.dart';
import '../login/blocs/login/login_bloc.dart';
import '../login/blocs/forgot_password/forgot_password_bloc.dart';
import '../login/blocs/verify_otp/verify_otp_bloc.dart';
import '../login/blocs/reset_password/reset_password_bloc.dart';
import '../splash/bloc/splash_bloc.dart';
import '../profile/blocs/profile/profile_bloc.dart';
import '../profile/repository/profile_repository.dart';
import '../support/blocs/support_details/support_details_bloc.dart';
import '../support/repository/support_details_repository.dart';
import '../support/blocs/raise_ticket/raise_ticket_bloc.dart';
import '../support/repository/raise_ticket_repository.dart';
import '../scan/bloc/submit_qr_code/submit_qr_code_bloc.dart';
import '../scan/repository/submit_qr_code_repository.dart';
import '../scan_history/blocs/scan_history/scan_history_bloc.dart';

import '../scan_history/blocs/scan_history_details/scan_history_details_bloc.dart';
import '../scan_history/repositories/scan_history_repository.dart';
import '../scan/bloc/recent_scan_history/recent_scan_history_bloc.dart';
import '../scan/repository/recent_scan_history_repository.dart';



class AllBlocProviders {
  AllBlocProviders._(); // Private constructor — not meant to be instantiated

  static List<BlocProvider> providers() {
    return [
      // ─── Splash ──────────────────────────────────────────────────────────
      BlocProvider<SplashBloc>(
        create: (_) => SplashBloc(),
      ),
      BlocProvider<LoginBloc>(
        create: (_) => LoginBloc(),
      ),
      BlocProvider<ForgotPasswordBloc>(
        create: (_) => ForgotPasswordBloc(),
      ),
      BlocProvider<VerifyOtpBloc>(
        create: (_) => VerifyOtpBloc(),
      ),
      BlocProvider<ResetPasswordBloc>(
        create: (_) => ResetPasswordBloc(),
      ),
      // ─── Profile ─────────────────────────────────────────────────────────
      BlocProvider<ProfileBloc>(
        create: (_) => ProfileBloc(profileRepository: ProfileRepository()),
      ),
      // ─── Support ─────────────────────────────────────────────────────────
      BlocProvider<SupportDetailsBloc>(
        create: (_) => SupportDetailsBloc(repository: SupportDetailsRepository()),
      ),
      BlocProvider<RaiseTicketBloc>(
        create: (_) => RaiseTicketBloc(raiseTicketRepository: RaiseTicketRepository()),
      ),
      // ─── Scan History ────────────────────────────────────────────────────
      BlocProvider<ScanHistoryBloc>(
        create: (_) => ScanHistoryBloc(repository: ScanHistoryRepository(),),
      ),
      BlocProvider<ScanHistoryDetailsBloc>(
        create: (_) => ScanHistoryDetailsBloc(ScanHistoryRepository()),
      ),
      BlocProvider<RecentScanHistoryBloc>(
        create: (_) => RecentScanHistoryBloc(RecentScanHistoryRepository()),
      ),
      BlocProvider<SubmitQrCodeBloc>(
        create: (_) => SubmitQrCodeBloc(repository: SubmitQrCodeRepository()),
      ),
    ];



  }
}