import 'package:rasadyar_auth/auth.dart';
import 'package:rasadyar_core/core.dart';
import 'package:rasadyar_inspection/presentation/action/logic.dart';
import 'package:rasadyar_inspection/presentation/add_mobile_inspector/logic.dart';
import 'package:rasadyar_inspection/presentation/add_mobile_inspector/view.dart';
import 'package:rasadyar_inspection/presentation/add_supervision/logic.dart';
import 'package:rasadyar_inspection/presentation/add_supervision/view.dart';
import 'package:rasadyar_inspection/presentation/display_information/logic.dart';
import 'package:rasadyar_inspection/presentation/display_information/view.dart';
import 'package:rasadyar_inspection/presentation/filter/logic.dart';
import 'package:rasadyar_inspection/presentation/location_details/logic.dart';
import 'package:rasadyar_inspection/presentation/location_details/view.dart';
import 'package:rasadyar_inspection/presentation/profile/logic.dart';
import 'package:rasadyar_inspection/presentation/profile/view.dart';
import 'package:rasadyar_inspection/presentation/registration_of_violation/logic.dart';
import 'package:rasadyar_inspection/presentation/registration_of_violation/view.dart';
import 'package:rasadyar_inspection/presentation/root/logic.dart';
import 'package:rasadyar_inspection/presentation/root/view.dart';
import 'package:rasadyar_inspection/presentation/routes/app_routes.dart';

sealed class InspectionPages {
  InspectionPages._();

  static final pages = [
    GetPage(
      name: InspectionRoutes.inspection,
      page: () => RootPage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.put(RootLogic());
        Get.put(InspectorFilterLogic());
        Get.lazyPut(() => LocationDetailsLogic(), fenix: true);
        Get.lazyPut(() => ActionLogic(), fenix: true);
        Get.lazyPut(() => ProfileLogic(), fenix: true);
      }),
    ),

    GetPage(
      name: InspectionRoutes.inspectionLocationDetails,
      page: () => LocationDetailsPage(),
      bindings: [BindingsBuilder.put(() => LocationDetailsLogic())],
    ),

    GetPage(
      name: InspectionRoutes.inspectionAddSupervision,
      page: () => AddSupervisionPage(),
      binding: BindingsBuilder.put(() => AddSupervisionLogic()),
    ),
    GetPage(
      name: InspectionRoutes.inspectionRegistrationOfViolation,
      page: () => RegistrationOfViolationPage(),
      binding: BindingsBuilder.put(() => RegistrationOfViolationLogic()),
    ),

    GetPage(
      name: InspectionRoutes.inspectionDisplayInformation,
      page: () => DisplayInformationPage(),
      binding: BindingsBuilder.put(() => DisplayInformationLogic()),
    ),
    GetPage(
      name: InspectionRoutes.inspectionUserProfile,
      page: () => ProfilePage(),
      binding: BindingsBuilder.put(() => ProfileLogic()),
    ),
    GetPage(
      name: InspectionRoutes.inspectionAddMobileInspector,
      page: () => AddMobileInspectorPage(),
      binding: BindingsBuilder.put(() => AddMobileInspectorLogic()),
    ),
  ];
}
