import 'package:get/get.dart';
import 'package:vnoteapp/pages/contract/contract_template/controller.dart';
import 'package:vnoteapp/pages/contract/contract_template/view.dart';
import 'package:vnoteapp/pages/contract/package_info/controller.dart';
import 'package:vnoteapp/pages/contract/package_info/view.dart';
import 'package:vnoteapp/pages/contract/package_list/controller.dart';
import 'package:vnoteapp/pages/contract/package_list/view.dart';
import 'package:vnoteapp/pages/contract/signature_board/controller.dart';
import 'package:vnoteapp/pages/contract/signature_board/view.dart';
import 'package:vnoteapp/pages/controllers/crowd_labels.dart';
import 'package:vnoteapp/pages/dashboard/controller.dart';
import 'package:vnoteapp/pages/dashboard/view.dart';
import 'package:vnoteapp/pages/home/controller.dart';
import 'package:vnoteapp/pages/home/view.dart';
import 'package:vnoteapp/pages/login/controller.dart';
import 'package:vnoteapp/pages/login/view.dart';
import 'package:vnoteapp/pages/login_gateway/controller.dart';
import 'package:vnoteapp/pages/login_gateway/view.dart';
import 'package:vnoteapp/pages/patient/create/controller.dart';
import 'package:vnoteapp/pages/patient/create/view.dart';
import 'package:vnoteapp/pages/patient/detail/controller.dart';
import 'package:vnoteapp/pages/patient/detail/view.dart';
import 'package:vnoteapp/pages/patient/info/controller.dart';
import 'package:vnoteapp/pages/patient/info/view.dart';
import 'package:vnoteapp/pages/patient/list/controller.dart';
import 'package:vnoteapp/pages/patient/list/view.dart';
import 'package:vnoteapp/pages/settings/controller.dart';
import 'package:vnoteapp/pages/settings/view.dart';
import 'package:vnoteapp/pages/splash/controller.dart';
import 'package:vnoteapp/pages/splash/view.dart';

class Routes {
  static final routes = [
    GetPage(
      name: "/splash",
      page: () => const SplashPage(),
      binding: BindingsBuilder(
        () {
          Get.put(SplashController());
        },
      ),
    ),
    GetPage(
      name: "/login",
      page: () => const LoginPage(),
      binding: BindingsBuilder(
        () {
          Get.put(LoginController());
        },
      ),
    ),
    GetPage(
      name: "/login/gateway",
      page: () => const LoginGatewayPage(),
      binding: BindingsBuilder(
        () {
          Get.put(LoginGatewayController());
        },
      ),
    ),
    GetPage(
      name: "/",
      page: () => const HomePage(),
      binding: BindingsBuilder(
        () {
          Get.put(HomeController());
        },
      ),
    ),
    GetPage(
      name: "/dashboard",
      // participatesInRootNavigator: false,
      // preventDuplicates: true,
      page: () => const DashboardPage(),
      binding: BindingsBuilder(
        () {
          Get.put(DashboardController());
        },
      ),
    ),
    GetPage(
      name: "/settings",
      page: () => const SettingsPage(),
      binding: BindingsBuilder(
        () {
          Get.put(SettingsController());
        },
      ),
    ),
    GetPage(
      name: "/patient/create",
      // participatesInRootNavigator: false,
      // preventDuplicates: true,
      page: () => const CreatePatientPageNew(),
      // page: () => const CreatePatientPage(),
      binding: BindingsBuilder(
        () {
          Get.put(CrowdLabelsController());
          Get.put(CreatePatientController());
        },
      ),
    ),
    GetPage(
      name: "/patient/list",
      // participatesInRootNavigator: false,
      // preventDuplicates: true,
      page: () => const PatientListPage(),
      binding: BindingsBuilder(
        () {
          Get.lazyPut(() => PatientListController());
        },
      ),
    ),
    GetPage(
      name: "/patient/detail",
      // preventDuplicates: true,
      page: () => const PatientDetailPage(),
      binding: BindingsBuilder(
        () {
          Get.put(PatientDetailController());
        },
      ),
    ),
    GetPage(
      name: "/patient/info",
      page: () => const PatientInfoPage(),
      binding: BindingsBuilder(
        () {
          Get.put(PatientInfoController());
        },
      ),
      transition: Transition.rightToLeftWithFade,
    ),
    GetPage(
      name: "/contract/package_list",
      page: () => const ServicePackageContractPage(),
      binding: BindingsBuilder(
        () {
          Get.put(CrowdLabelsController());
          Get.put(ServicePackageContractController());
        },
      ),
    ),
    GetPage(
      name: "/contract/package_info",
      page: () => const PackageInfoPage(),
      binding: BindingsBuilder(
        () {
          Get.put(PackageInfoController());
        },
      ),
    ),
    GetPage(
      name: "/contract/signature",
      page: () => const SignatureBoardPage(),
      binding: BindingsBuilder(
        () {
          Get.put(SignatureBoardController());
        },
      ),
      transition: Transition.rightToLeftWithFade,
    ),
    GetPage(
      name: "/contract/contract_template",
      page: () => ContractTemplatePage(),
      binding: BindingsBuilder(
        () {
          Get.put(ContractTemplateController());
        },
      ),
    ),
  ];
}
