import 'package:get/get.dart';
import 'package:taafee_mobile/features/account/presentation_layer/screens/about_us.dart';
import 'package:taafee_mobile/features/account/presentation_layer/screens/add_card.dart';
import 'package:taafee_mobile/features/account/presentation_layer/screens/contact_us.dart';
import 'package:taafee_mobile/features/account/presentation_layer/screens/my_cards.dart';
import 'package:taafee_mobile/features/account/presentation_layer/screens/privacy.dart';
import 'package:taafee_mobile/features/auth/presentation_layer/screens/forgot_password.dart';
import 'package:taafee_mobile/features/auth/presentation_layer/screens/reset_password.dart';
import 'package:taafee_mobile/features/auth/presentation_layer/screens/verification_code_reset_password.dart';
import 'package:taafee_mobile/features/card/presentation_layer/screens/card_details.dart';
import 'package:taafee_mobile/features/card/presentation_layer/screens/feedback.dart';
import 'package:taafee_mobile/features/card/presentation_layer/screens/images_view.dart';
import 'package:taafee_mobile/features/card/presentation_layer/screens/review_form.dart';
import 'package:taafee_mobile/features/category/presentation_layer/screens/category_details.dart';
import 'package:taafee_mobile/features/chat/presentation_layer/screens/chat_details.dart';
import 'package:taafee_mobile/features/home/presentation_layer/screens/super_home.dart';
import 'package:taafee_mobile/features/splash/presentation_layer.dart/screens.dart/splash.dart';

import '../../features/account/presentation_layer/screens/change_password.dart';
import '../../features/account/presentation_layer/screens/edit_profile.dart';
import '../../features/auth/presentation_layer/screens/login.dart';
import '../../features/auth/presentation_layer/screens/register.dart';
import '../../features/auth/presentation_layer/screens/verification_code.dart';
import '../../features/card/presentation_layer/screens/images_gallery_view.dart';
import '../../features/category/presentation_layer/screens/category.dart';
import '../../features/favorite/presentation_layer/screens/favorite.dart';
import '../../features/home/presentation_layer/screens/home.dart';
import '../../features/notification/presentation_layer/screens/notification.dart';
import '../../features/onboarding/presentation/onboarding.dart';

class RouteName {
  static String changePassword = '/changePassword';
  static String editProfile = '/editProfile';
  static String onboarding = '/onboarding';
  static String splash = '/';
  static String login = '/login';
  static String register = '/register';
  static String verificationCodePage = '/verification-code';
  static String imagesGalleryView = '/images-gallery-view';
  static String home = '/home-screen';

  static String superHome = '/super_home';

  static String categoryScreen = '/category_screen';

  static String favoriteScreen = '/favorite-screen';
  static String categoryDetails = '/category-details';
  static String chatDetails = '/chat-details';
  static String resetPassword = '/reset-password-screen';
  static String verificationCodeResetPassword = '/verification-code-reset-password-screen';
  static String cardDetails = '/card-details-screen';
  static String addCard = '/add-card-screen';
  static String notification = '/notification-screen';
  static String myCards = '/my-cards-screen';
  static String aboutUs = '/about-us-screen';
  static String contactUs = '/contact-us-screen';
  static String privacy = '/privacy-screen';
  static String forgotPassword = '/forgot-password-screen';
  static String feedback = '/feedback-screen';
  static String reviewForm = '/review-form-screen';
  static String imageView = '/image-view-screen';
}

class RoutingManager {
  static List<GetPage<dynamic>> pages = [
    GetPage(
      name: RouteName.imagesGalleryView,
      page: () => ImagesGalleryView(),
    ),
    GetPage(
      name: RouteName.changePassword,
      page: () => ChangePassword(),
    ),
    GetPage(
      name: RouteName.editProfile,
      page: () => EditProfile(),
    ),
    GetPage(
      name: RouteName.onboarding,
      page: () => Onboarding(),
    ),
    GetPage(
      name: RouteName.splash,
      page: () => SplashScreen(),
    ),
    GetPage(
      name: RouteName.login,
      page: () => LoginScreen(),
    ),
    GetPage(
      name: RouteName.register,
      page: () => RegisterScreen(),
    ),
    GetPage(
      name: RouteName.verificationCodePage,
      page: () => VerificationCodeScreen(),
    ),
    GetPage(
      name: RouteName.home,
      page: () => HomeScreen(),
    ),
    GetPage(
      name: RouteName.superHome,
      page: () => SuperHome(),
    ),
    GetPage(
      name: RouteName.categoryScreen,
      page: () => CategoryScreen(),
    ),
    GetPage(
      name: RouteName.favoriteScreen,
      page: () => FavoriteScreen(),
    ),
    GetPage(
      name: RouteName.categoryDetails,
      page: () => CategoryDetailsScreen(),
    ),
    GetPage(
      name: RouteName.chatDetails,
      page: () => ChatDetails(),
    ),
    GetPage(
      name: RouteName.resetPassword,
      page: () => ResetPasswordScreen(),
    ),
    GetPage(
      name: RouteName.verificationCodeResetPassword,
      page: () => VerificationCodeResetPasswordScreen(),
    ),
    GetPage(
      name: RouteName.cardDetails,
      page: () => CardDetailsScreen(),
    ),
    GetPage(
      name: RouteName.addCard,
      page: () => AddCardScreen(),
    ),
    GetPage(
      name: RouteName.notification,
      page: () => const NotificationScreen(),
    ),
    GetPage(
      name: RouteName.myCards,
      page: () => MyCardsScreen(),
    ),
    GetPage(
      name: RouteName.aboutUs,
      page: () => const AboutUsScreen(),
    ),
    GetPage(
      name: RouteName.contactUs,
      page: () => ContactUsScreen(),
    ),
    GetPage(
      name: RouteName.privacy,
      page: () => const PrivacyScreen(),
    ),
    GetPage(
      name: RouteName.forgotPassword,
      page: () => ForgotPasswordScreen(),
    ),
    GetPage(
      name: RouteName.feedback,
      page: () => const FeedbackScreen(),
    ),
    GetPage(
      name: RouteName.reviewForm,
      page: () => const ReviewFormScreen(),
    ),
    GetPage(
      name: RouteName.imageView,
      page: () => ImagesViewScreen(),
    ),
  ];

  static void off(String route) {
    Get.offNamed(route);
  }

  static void offAll(String route) {
    Get.offAllNamed(route);
  }

  static void to(String route, {dynamic arguments}) {
    Get.toNamed(route, arguments: arguments);
  }

  static void back() {
    Get.back();
  }
}
