import 'package:get/get.dart';
import 'package:praresi/presentation/controllers/auth_controller.dart';
import 'package:praresi/presentation/controllers/riwayat_controller.dart';
import 'package:praresi/presentation/views/menu_akun/change_password_view.dart';
import 'package:praresi/presentation/views/menu_akun/data_pelanggan_view.dart';
import 'package:praresi/presentation/views/menu_akun/panduan_pengguna_view.dart';
import 'package:praresi/presentation/views/menu_akun/profile_view.dart';
import 'package:praresi/presentation/views/menu_akun/riwayat_pengiriman.dart';
import 'package:praresi/presentation/views/menu_akun/store_view.dart';
import 'package:praresi/presentation/views/menu_riwayat/detail_riwayat_view.dart';
import 'package:praresi/presentation/views/splash_view.dart';
import '../views/login_view.dart';
import '../views/register_view.dart';
import '../views/forgot_view.dart';
import '../views/main_navbar.dart'; // import baru
import 'app_routes.dart';


class AppPages {
  static final routes = [
    GetPage(
      name: AppRoutes.login,
      page: () => LoginView(),
      binding: BindingsBuilder(() {
        Get.put(AuthController());
      }),
    ),
    GetPage(
      name: AppRoutes.register,
      page: () => RegisterView(),
    ),
    GetPage(
      name: AppRoutes.forgot,
      page: () => ForgotView(),
    ),
    GetPage(
      name: AppRoutes.home, // gunakan route 'home' untuk MainNavbar
      page: () => const MainNavbar(),
    ),
    GetPage(
      name: AppRoutes.store, // gunakan route 'home' untuk MainNavbar
      page: () =>  StoreView(),
    ),
    GetPage(
      name: AppRoutes.splash,
      page: () => const SplashView(),
    ),
    GetPage(
      name: AppRoutes.changepassword,
      page: () => ChangePasswordView(),
    ),
    GetPage(
      name: AppRoutes.detailRiwayat,
      page: () => const DetailRiwayatView(),
      binding: BindingsBuilder(() {
        Get.put(RiwayatController(), permanent: true);
      }),
    ),
    GetPage(
      name: AppRoutes.profile,
      page: () => ProfileView(),
    ),
    GetPage(
      name: AppRoutes.datapelanggan,
      page: () => DataPelangganView(),
    ),
    GetPage(
      name: AppRoutes.riwayatbulanan,
      page: () => RiwayatBulananView(),
    ),

        GetPage(
      name: AppRoutes.panduanpengguna,
      page: () => PanduanPenggunaPage(),
    ),


    
  ];
}