import 'package:get/get.dart';
import 'package:keyboard/dialog/login/login_dialog_controller.dart';
import 'package:keyboard/module/about/about_controller.dart';
import 'package:keyboard/module/browser/browser_controller.dart';
import 'package:keyboard/module/change/birthday/change_birthday_controller.dart';
import 'package:keyboard/module/change/birthday/change_birthday_page.dart';
import 'package:keyboard/module/change/character/change_character_controller.dart';
import 'package:keyboard/module/change/gender/change_gender_controller.dart';
import 'package:keyboard/module/change/hobbies/change_hobbies_controller.dart';
import 'package:keyboard/module/change/nickname/change_nickname_controller.dart';
import 'package:keyboard/module/character/content/character_group_content_controller.dart';
import 'package:keyboard/module/character_custom/character_custom_controller.dart';
import 'package:keyboard/module/character_custom/detail/character_custom_detail_page.dart';
import 'package:keyboard/module/character_custom/list/character_custom_list_controller.dart';
import 'package:keyboard/module/feedback/feedback_controller.dart';
import 'package:keyboard/module/intimacy_analyse/intimacy_analyse_controller.dart';
import 'package:keyboard/module/intimacy_analyse/intimacy_analyse_page.dart';
import 'package:keyboard/module/intimacy_scale/intimacy_scale_controller.dart';
import 'package:keyboard/module/keyboard/keyboard_controller.dart';
import 'package:keyboard/module/keyboard_manage/keyboard_manage_controller.dart';
import 'package:keyboard/module/keyboard_tutorial/video/keyboard_tutorial_video_controller.dart';
import 'package:keyboard/module/keyboard_tutorial/video/keyboard_tutorial_video_page.dart';
import 'package:keyboard/module/login/login_controller.dart';
import 'package:keyboard/module/mine/mine_controller.dart';
import 'package:keyboard/module/new_user/new_user_controller.dart';
import 'package:keyboard/module/new_user/result/new_user_result_controller.dart';
import 'package:keyboard/module/new_user/result/new_user_result_page.dart';
import 'package:keyboard/module/profile/edit/profile_edit_controller.dart';
import 'package:keyboard/module/profile/profile_controller.dart';
import 'package:keyboard/module/profile/profile_page.dart';
import 'package:keyboard/module/store/new_discount/new_discount_page.dart';
import 'package:keyboard/module/store/store_controller.dart';
import 'package:keyboard/module/store/store_page.dart';
import 'package:keyboard/module/user_info/user_info_controller.dart';
import 'package:keyboard/module/user_info/user_info_page.dart';
import 'package:keyboard/module/user_profile/user_profile_controller.dart';

import '../di/get_it.dart';
import '../module/about/about_page.dart';
import '../module/browser/browser_page.dart';
import '../module/change/character/change_character_page.dart';
import '../module/change/gender/change_gender_page.dart';
import '../module/change/hobbies/change_hobbies_page.dart';
import '../module/change/nickname/change_nickname_page.dart';
import '../module/character/character_controller.dart';
import '../module/character_custom/character_custom_page.dart';
import '../module/character_custom/detail/character_custom_detail_controller.dart';
import '../module/character_custom/list/character_custom_list_page.dart';
import '../module/feedback/feedback_page.dart';
import '../module/intimacy_analyse/analyse_report/intimacy_analyse_report_view_controller.dart';
import '../module/intimacy_analyse/image_viewer/image_viewer_controller.dart';
import '../module/intimacy_analyse/image_viewer/image_viewer_page.dart';
import '../module/intimacy_analyse/intimacy_analyse_upload/dialog/direction/custom_direction_edit_controller.dart';
import '../module/intimacy_analyse/intimacy_analyse_upload/dialog/intimacy_generate_character/intimacy_generate_character_edit_controller.dart';
import '../module/intimacy_analyse/intimacy_analyse_upload/intimacy_analyse_upload_controller.dart';
import '../module/intimacy_analyse/intimacy_analyse_upload/intimacy_analyse_upload_page.dart';
import '../module/intimacy_analyse/screenshot_reply/conversation_analysis/conversation_analysis_controller.dart';
import '../module/intimacy_analyse/screenshot_reply/intimacy_analyse_screenshot_reply_controller.dart';
import '../module/intimacy_analyse/screenshot_reply/scan_image_reply/scan_image_reply_controller.dart';
import '../module/intimacy_scale/intimacy_scale_page.dart';
import '../module/intro/intro_controller.dart';
import '../module/intro/intro_page.dart';
import '../module/keyboard_guide/keyboard_guide_controller.dart';
import '../module/keyboard_guide/keyboard_guide_page.dart';
import '../module/keyboard_manage/keyboard_manage_page.dart';
import '../module/keyboard_tutorial/android/keyboard_tutorial_android_view_controller.dart';
import '../module/keyboard_tutorial/ios/keyboard_tutorial_ios_view_controller.dart';
import '../module/keyboard_tutorial/keyboard_tutorial_controller.dart';
import '../module/keyboard_tutorial/keyboard_tutorial_page.dart';
import '../module/keyboard_tutorial/video/android/keyboard_tutorial_video_android_view_controller.dart';
import '../module/keyboard_tutorial/video/ios/keyboard_tutorial_video_android_ios_controller.dart';
import '../module/login/login_page.dart';
import '../module/main/main_controller.dart';
import '../module/main/main_page.dart';
import '../module/new_user/new_user_page.dart';
import '../module/profile/edit/profile_edit_page.dart';
import '../module/splash/splash_page.dart';
import '../module/store/discount/discount_controller.dart';
import '../module/store/new_discount/new_discount_controller.dart';
import '../module/store/suprise/goods_surprise_controller.dart';
import '../module/user_profile/user_profile_page.dart';
import '../module/zodiac_love_intimacy/zodiac_love_intimacy_controller.dart';
import '../module/zodiac_love_intimacy/zodiac_love_intimacy_page.dart';

abstract class AppPage {
  static final pages = <GetPage>[...generalPages];
}

abstract class RoutePath {
  static const splash = '/';
  static const mainTab = '/mainTab';
  static const login = '/login';
  static const keyboardSetting = '/keyboardSetting';
  static const feedback = '/feedback';
  static const about = '/about';
  static const browser = '/browser';
  static const keyboardManage = '/keyboardManage';
  static const characterCustom = '/characterCustom';
  static const characterCustomDetail = '/characterCustomDetail';
  static const characterCustomList = '/characterCustomList';
  static const store = '/store';
  static const profile = '/profile';
  static const profileEdit = '/profileEdit';

  // 键盘引导页
  static const keyboardGuide = '/keyboardGuide';

  // 亲密度分析页
  static const intimacyAnalyse = '/intimacyAnalyse';

  // 亲密度分析上传页
  static const intimacyAnalyseUpload = '/intimacyAnalyseUpload';

  static const changeNickname = '/changeNickname';
  static const changeGender = '/changeGender';
  static const changeBirthday = '/changeBirthday';
  static const changeHobbies = '/changeHobbies';
  static const changeCharacters = '/changeCharacters';
  static const userInfo = '/userInfo';
  static const newUser = '/newUser';
  static const newUserResult = '/newUserResult';

  // 用户个人档案页面
  static const userProfile = '/userProfile';

  // 图片预览页
  static const imageViewer = '/imageViewerPage';

  static const newDiscount = '/newDiscount';

  static const zodiacLoveIntimacy = '/zodiacLoveIntimacy';

  //   介绍页
  static const intro = '/intro';

  //   亲密度刻度调节
  static const intimacyScale = '/intimacyScale';

  // 键盘使用教程引导页
  static const keyboardTutorial = '/keyboardTutorial';

  // 键盘使用教程引导-视频教程页
  static const keyboardTutorialVideo = '/keyboardTutorialVideo';
}

class AppBinding extends Bindings {
  @override
  void dependencies() {
    // lazyPut(() => getIt.get<MainController>());
    lazyPut(() => getIt.get<MineController>());
    lazyPut(() => getIt.get<CharacterController>());
    lazyPut(() => getIt.get<LoginController>());
    lazyPut(() => getIt.get<KeyBoardController>());
    lazyPut(() => getIt.get<FeedbackController>());
    lazyPut(() => getIt.get<AboutController>());
    lazyPut(() => getIt.get<BrowserController>());
    lazyPut(() => getIt.get<CharacterGroupContentController>());
    lazyPut(() => getIt.get<KeyboardManageController>());
    lazyPut(() => getIt.get<CharacterCustomController>());
    lazyPut(() => getIt.get<CharacterCustomDetailController>());
    lazyPut(() => getIt.get<CharacterCustomListController>());
    lazyPut(() => getIt.get<StoreController>());
    lazyPut(() => getIt.get<GoodsSurpriseController>());
    lazyPut(() => getIt.get<DiscountController>());
    lazyPut(() => getIt.get<ProfileController>());
    lazyPut(() => getIt.get<ProfileEditController>());
    lazyPut(() => getIt.get<KeyboardGuidePageController>());
    lazyPut(() => getIt.get<IntimacyAnalyseController>());
    lazyPut(() => getIt.get<IntimacyAnalyseReportController>());
    lazyPut(() => getIt.get<IntimacyAnalyseScreenshotReplyController>());
    lazyPut(() => getIt.get<IntimacyAnalyseUploadController>());
    lazyPut(() => getIt.get<ChangeNicknameController>());
    lazyPut(() => getIt.get<ChangeGenderController>());
    lazyPut(() => getIt.get<ChangeBirthdayController>());
    lazyPut(() => getIt.get<ConversationAnalysisController>());
    lazyPut(() => getIt.get<ScanImageReplyController>());
    lazyPut(() => getIt.get<ChangeHobbiesController>());
    lazyPut(() => getIt.get<ChangeCharacterController>());
    lazyPut(() => getIt.get<LoginDialogController>());
    lazyPut(() => getIt.get<ImageViewerController>());
    lazyPut(() => getIt.get<UserInfoController>());
    lazyPut(() => getIt.get<NewUserController>());
    lazyPut(() => getIt.get<NewUserResultController>());

    lazyPut(() => getIt.get<CustomDirectionEditController>());
    lazyPut(() => getIt.get<UserProfileController>());
    lazyPut(() => getIt.get<NewDiscountController>());
    lazyPut(() => getIt.get<IntroController>());

    lazyPut(() => getIt.get<IntimacyGenerateCharacterEditController>());
    lazyPut(() => getIt.get<ZodiacLoveIntimacyController>());
    lazyPut(() => getIt.get<IntimacyScaleController>());
    lazyPut(() => getIt.get<KeyboardTutorialController>());
    lazyPut(() => getIt.get<KeyboardTutorialAndroidViewController>());
    lazyPut(() => getIt.get<KeyboardTutorialIosViewController>());
    lazyPut(() => getIt.get<KeyboardTutorialVideoController>());
    lazyPut(() => getIt.get<KeyboardTutorialVideoAndroidViewController>());
    lazyPut(() => getIt.get<KeyboardTutorialVideoIosViewController>());
  }

  void lazyPut<S>(InstanceBuilderCallback<S> builder) {
    Get.lazyPut(builder, fenix: true);
  }
}

final generalPages = [
  GetPage(name: RoutePath.mainTab, page: () => MainPage()),
  GetPage(name: RoutePath.login, page: () => LoginPage()),
  GetPage(name: RoutePath.feedback, page: () => FeedbackPage()),
  GetPage(name: RoutePath.about, page: () => AboutPage()),
  GetPage(name: RoutePath.browser, page: () => BrowserPage()),
  GetPage(name: RoutePath.keyboardManage, page: () => KeyboardManagePage()),
  GetPage(name: RoutePath.characterCustom, page: () => CharacterCustomPage()),
  GetPage(
    name: RoutePath.characterCustomDetail,
    page: () => CharacterCustomDetailPage(),
  ),
  GetPage(
    name: RoutePath.characterCustomList,
    page: () => CharacterCustomListPage(),
  ),
  GetPage(name: RoutePath.store, page: () => StorePage()),
  GetPage(name: RoutePath.profile, page: () => ProfilePage()),
  GetPage(name: RoutePath.profileEdit, page: () => ProfileEditPage()),
  // 键盘引导页
  GetPage(name: RoutePath.keyboardGuide, page: () => KeyboardGuidePage()),
  // 亲密度报告页
  GetPage(name: RoutePath.intimacyAnalyse, page: () => IntimacyAnalysePage()),
  // 亲密度分析上传页
  GetPage(
    name: RoutePath.intimacyAnalyseUpload,
    page: () => IntimacyAnalyseUploadPage(),
  ),

  GetPage(name: RoutePath.changeNickname, page: () => ChangeNicknamePage()),
  GetPage(name: RoutePath.changeGender, page: () => ChangeGenderPage()),
  GetPage(name: RoutePath.changeBirthday, page: () => ChangeBirthdayPage()),
  GetPage(name: RoutePath.changeHobbies, page: () => ChangeHobbiesPage()),
  GetPage(name: RoutePath.changeCharacters, page: () => ChangeCharacterPage()),

  // 图片预览页
  GetPage(name: RoutePath.imageViewer, page: () => ImageViewerPage()),

  GetPage(name: RoutePath.userInfo, page: () => UserInfoPage()),
  GetPage(name: RoutePath.newUser, page: () => NewUserPage()),
  GetPage(name: RoutePath.newUserResult, page: () => NewUserResultPage()),
  GetPage(name: RoutePath.userProfile, page: () => UserProfilePage()),
  GetPage(name: RoutePath.splash, page: () => SplashPage()),
  GetPage(name: RoutePath.newDiscount, page: () => NewDiscountPage()),
  GetPage(
    name: RoutePath.zodiacLoveIntimacy,
    page: () => ZodiacLoveIntimacyPage(),
  ),
  GetPage(name: RoutePath.intro, page: () => IntroPage()),
  GetPage(name: RoutePath.intimacyScale, page: () => IntimacyScalePage()),
  GetPage(name: RoutePath.keyboardTutorial, page: () => KeyboardTutorialPage()),
  GetPage(
    name: RoutePath.keyboardTutorialVideo,
    page: () => KeyboardTutorialVideoPage(),
  ),
];
