import 'package:rasadyar_core/core.dart';
import 'package:rasadyar_inspection/presentation/pages/auth/logic.dart';
import 'package:rasadyar_inspection/presentation/pages/auth/view.dart';
import 'package:rasadyar_inspection/presentation/pages/filter/logic.dart';
import 'package:rasadyar_inspection/presentation/pages/inspection_map/widget/map/logic.dart';
import 'package:rasadyar_inspection/presentation/pages/pages.dart';
import 'package:rasadyar_inspection/presentation/pages/users/logic.dart';
import 'package:rasadyar_inspection/presentation/routes/app_routes.dart';
import 'package:rasadyar_inspection/presentation/widget/captcha/logic.dart';

sealed class InspectionPages {
  InspectionPages._();

  static final pages = [

    GetPage(
      name: InspectionRoutes.auth,
      page: () => AuthPage(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => AuthLogic());
        Get.lazyPut(() => CaptchaWidgetLogic());
      }),
    ),
    GetPage(
      name: InspectionRoutes.init,
      page: () => RootPage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(() => RootLogic());
        Get.lazyPut(() => InspectorFilterLogic());
        Get.lazyPut(() => InspectionMapLogic());
        Get.lazyPut(() => BaseLogic());
        Get.lazyPut(() => UsersLogic());
        Get.lazyPut(() => RecordsLogic());
        Get.lazyPut(() => StatisticsLogic());
        Get.lazyPut(() => LocationDetailsLogic(), fenix: true);
        Get.lazyPut(() => ActionLogic());
        Get.lazyPut(() => ProfileLogic());
        Get.lazyPut(() => MapLogic());
      }),
    ),

    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()),
    ),

  ];
}
