import 'package:flutter/material.dart';
import 'package:flutter_modular/flutter_modular.dart';
import 'package:staff_home/staff_home.dart';
import 'package:staff_profile/staff_profile.dart';
import 'package:staff_profile_info/staff_profile_info.dart';
import 'package:staff_emergency_contact/staff_emergency_contact.dart';
import 'package:staff_profile_experience/staff_profile_experience.dart';
import 'package:staff_bank_account/staff_bank_account.dart';
import 'package:staff_tax_forms/staff_tax_forms.dart';
import 'package:staff_documents/staff_documents.dart';
import 'package:staff_certificates/staff_certificates.dart';
import 'package:staff_attire/staff_attire.dart';
import 'package:staff_shifts/staff_shifts.dart';
import 'package:staff_payments/staff_payements.dart';
import 'package:staff_time_card/staff_time_card.dart';
import 'package:staff_availability/staff_availability.dart';
import 'package:staff_clock_in/staff_clock_in.dart';

import 'package:staff_main/src/presentation/blocs/staff_main_cubit.dart';
import 'package:staff_main/src/presentation/constants/staff_main_routes.dart';
import 'package:staff_main/src/presentation/pages/placeholder_page.dart';
import 'package:staff_main/src/presentation/pages/staff_main_page.dart';

class StaffMainModule extends Module {
  @override
  void binds(Injector i) {
    i.addSingleton(StaffMainCubit.new);
  }

  @override
  void routes(RouteManager r) {
    r.child(
      '/',
      child: (BuildContext context) => const StaffMainPage(),
      children: <ParallelRoute<dynamic>>[
        ModuleRoute<dynamic>(
          StaffMainRoutes.shifts,
          module: StaffShiftsModule(),
        ),
        ModuleRoute<dynamic>(
          StaffMainRoutes.payments,
          module: StaffPaymentsModule(),
        ),
        ModuleRoute<dynamic>(
          StaffMainRoutes.home,
          module: StaffHomeModule(),
        ),
        ModuleRoute<dynamic>(
          StaffMainRoutes.clockIn,
          module: StaffClockInModule(),
        ),
        ModuleRoute<dynamic>(
          StaffMainRoutes.profile,
          module: StaffProfileModule(),
        ),
      ],
    );
    r.module('/onboarding', module: StaffProfileInfoModule());
    r.module('/emergency-contact', module: StaffEmergencyContactModule());
    r.module('/experience', module: StaffProfileExperienceModule());
    r.module('/attire', module: StaffAttireModule());
    r.module('/bank-account', module: StaffBankAccountModule());
    r.module('/tax-forms', module: StaffTaxFormsModule());
    r.module(
      '/documents',
      module: StaffDocumentsModule(),
    );
    r.module(
      '/certificates',
      module: StaffCertificatesModule(),
    );
    r.module(
      '/time-card',
      module: StaffTimeCardModule(),
    );
    r.module('/availability', module: StaffAvailabilityModule());
    r.module(
      '/clock-in',
      module: StaffClockInModule(),
    );
  }
}
