import 'package:rasadyar_auth/auth.dart';
import 'package:rasadyar_chicken/presentation/pages/buy/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/buy/view.dart';
import 'package:rasadyar_chicken/presentation/pages/buy_in_province/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/buy_in_province/view.dart';
import 'package:rasadyar_chicken/presentation/pages/buy_in_province_all/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/buy_in_province_waiting/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/buy_out_of_province/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/buy_out_of_province/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/profile/logic.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/sale/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/sale/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/pages/sales_out_of_province_buyers/logic.dart';
import 'package:rasadyar_chicken/presentation/pages/sales_out_of_province_sales_list/logic.dart';
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
import 'package:rasadyar_chicken/presentation/widget/base_page/logic.dart';
import 'package:rasadyar_chicken/presentation/widget/search/logic.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.lazyPut(() => RootLogic());
        Get.lazyPut(() => BaseLogic());
        Get.lazyPut(() => HomeLogic());
        Get.lazyPut(() => BuyLogic());
        Get.lazyPut(() => SaleLogic());
        Get.lazyPut(() => ProfileLogic());
      }),
    ),

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


    //sales
    GetPage(
      name: ChickenRoutes.sale,
      page: () => SalePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(() => SaleLogic());
       Get.lazyPut(() => BaseLogic());
       Get.lazyPut(() => SalesOutOfProvinceLogic());
       Get.lazyPut(() => RootLogic());
      }),
    ),
    GetPage(
      name: ChickenRoutes.salesOutOfProvince,
      page: () => SalesOutOfProvincePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(() => SearchLogic());
        Get.lazyPut(() => SalesOutOfProvinceLogic());
        Get.lazyPut(() => SalesOutOfProvinceBuyersLogic());
        Get.lazyPut(() => SalesOutOfProvinceSalesListLogic());
      }),
    ),
    GetPage(
      name: ChickenRoutes.salesInProvince,
      page: () => SalesInProvincePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(() => BaseLogic());
         Get.lazyPut(() => SalesInProvinceLogic());
        Get.lazyPut(() => SearchLogic());
      }),
    ),

    //buy
    GetPage(
      name: ChickenRoutes.buy,
      page: () => BuyPage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(() => BaseLogic());
        Get.lazyPut(() => BuyLogic());
      }),
    ),

    GetPage(
      name: ChickenRoutes.buysOutOfProvince,
      page: () => BuyOutOfProvincePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(() => BaseLogic());
        Get.lazyPut(() => SearchLogic());
          Get.lazyPut(() => BuyOutOfProvinceLogic());
      }),
    ),

    GetPage(
      name: ChickenRoutes.buysInProvince,
      page: () => BuyInProvincePage(),
      middlewares: [AuthMiddleware()],
      binding: BindingsBuilder(() {
        Get.lazyPut(() => BaseLogic());
        Get.lazyPut(() => SearchLogic());
         Get.lazyPut(() => BuyInProvinceLogic());
         Get.lazyPut(() => BuyInProvinceWaitingLogic());
         Get.lazyPut(() => BuyInProvinceAllLogic());
      }),
    ),
  ];
}
