import 'package:rasadyar_auth/auth.dart';
import 'package:rasadyar_chicken/presentation/pages/buys_out_of_province/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/buys_out_of_province/view.dart';
import 'package:rasadyar_chicken/presentation/pages/entering_the_warehouse/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/entering_the_warehouse/view.dart';
import 'package:rasadyar_chicken/presentation/pages/home/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/home/view.dart';
import 'package:rasadyar_chicken/presentation/pages/out_of_province/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/out_of_province/view.dart';
import 'package:rasadyar_chicken/presentation/pages/root/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/root/view.dart';
import 'package:rasadyar_chicken/presentation/pages/sales_in_province/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/sales_in_province/view.dart';
import 'package:rasadyar_chicken/presentation/pages/sales_out_of_province/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/sales_out_of_province/view.dart';
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
import 'package:rasadyar_core/core.dart';

sealed class ChickenPages {
  ChickenPages._();

  static final pages = [
    GetPage(
      name: ChickenRoutes.init,
      page: () => RootPage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.put(RootLogic());
        Get.lazyPut(()=>HomeLogic());
        Get.lazyPut(()=>SalesInProvinceLogic());
        Get.lazyPut(()=>OutOfProvinceLogic());
        Get.lazyPut(()=>SalesOutOfProvinceLogic());
      }),
    ),

    GetPage(
      name: ChickenRoutes.home,
      page: () => HomePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.put(HomeLogic());
        Get.put(RootLogic());
      }),
    ),

    GetPage(
      name: ChickenRoutes.enteringTheWarehouse,
      page: () => EnteringTheWarehousePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(()=>EnteringTheWarehouseLogic());
        Get.lazyPut(()=>RootLogic());
      }),
    ),
    GetPage(
      name: ChickenRoutes.salesInProvince,
      page: () => SalesInProvincePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(()=>SalesInProvinceLogic());
        Get.lazyPut(()=>RootLogic());
      }),
    ),



    GetPage(
      name: ChickenRoutes.outOfProvince,
      page: () => OutOfProvincePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(()=>OutOfProvinceLogic());

        Get.lazyPut(()=>SalesOutOfProvinceLogic());
        Get.lazyPut(()=>RootLogic());
      }),
    ),

    GetPage(
      name: ChickenRoutes.salesOutOfProvince,
      page: () => SalesOutOfProvincePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(()=>SalesOutOfProvinceLogic());
        Get.lazyPut(()=>RootLogic());
      }),
    ),

    GetPage(
      name: ChickenRoutes.buysOutOfProvince,
      page: () => BuysOutOfProvincePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(()=>BuysOutOfProvinceLogic());
        Get.lazyPut(()=>RootLogic());
      }),
    ),
  ];
}
