// Author: fengshengxiong
// Date: 2024/5/7
// Description: 路由页面映射

import 'package:flutter/animation.dart';
import 'package:get/get.dart';
import 'package:tone_snap/modules/sidea/about/about_binding.dart';
import 'package:tone_snap/modules/sidea/about/about_view.dart';
import 'package:tone_snap/modules/sidea/change_voice/change_voice_binding.dart';
import 'package:tone_snap/modules/sidea/change_voice/change_voice_view.dart';
import 'package:tone_snap/modules/sidea/home/home_binding.dart' as home_binding_a;
import 'package:tone_snap/modules/sidea/initial/initial_binding.dart' as initial_binding_a;
import 'package:tone_snap/modules/sidea/initial/initial_view.dart' as initial_view_a;
import 'package:tone_snap/modules/sidea/me/me_binding.dart';
import 'package:tone_snap/modules/sidea/play_sound/play_sound_binding.dart';
import 'package:tone_snap/modules/sidea/play_sound/play_sound_view.dart';
import 'package:tone_snap/modules/sidea/record_sound/record_sound_binding.dart';
import 'package:tone_snap/modules/sidea/record_sound/record_sound_view.dart';
import 'package:tone_snap/modules/sidea/settings/settings_binding.dart' as settings_binding_a;
import 'package:tone_snap/modules/sidea/upload_method/upload_mothod_binding.dart';
import 'package:tone_snap/modules/sidea/upload_method/upload_mothod_view.dart';
import 'package:tone_snap/modules/sideb/album/album_binding.dart';
import 'package:tone_snap/modules/sideb/album/album_view.dart';
import 'package:tone_snap/modules/sideb/collect_playlists/collect_playlists_binding.dart';
import 'package:tone_snap/modules/sideb/home/home_binding.dart' as home_binding_b;
import 'package:tone_snap/modules/sideb/initial/initial_binding.dart' as initial_binding_b;
import 'package:tone_snap/modules/sideb/initial/initial_view.dart' as initial_view_b;
import 'package:tone_snap/modules/sideb/love_songs/love_songs_binding.dart';
import 'package:tone_snap/modules/sideb/love_songs/love_songs_view.dart';
import 'package:tone_snap/modules/sideb/personal_music_library/personal_music_library_binding.dart';
import 'package:tone_snap/modules/sideb/play_page/play_page_binding.dart';
import 'package:tone_snap/modules/sideb/play_page/play_page_view.dart';
import 'package:tone_snap/modules/sideb/playlists/playlists_binding.dart';
import 'package:tone_snap/modules/sideb/search_music/search_music_binding.dart';
import 'package:tone_snap/modules/splash/splash_binding.dart';
import 'package:tone_snap/modules/splash/splash_view.dart';
import 'package:tone_snap/modules/web_page/web_page_binding.dart';
import 'package:tone_snap/modules/web_page/web_page_view.dart';
import 'package:tone_snap/routes/app_routes.dart';

class AppPages {
  AppPages._();

  static final routes = [
    GetPage(
      name: AppRoutes.splash,
      page: () => SplashView(),
      binding: SplashBinding(),
    ),

    /// SideA
    GetPage(
      name: AppRoutes.initialA,
      page: () => initial_view_a.InitialView(),
      bindings: [
        initial_binding_a.InitialBinding(),
        home_binding_a.HomeBinding(),
        MeBinding(),
        settings_binding_a.SettingsBinding(),
      ],
    ),
    GetPage(
      name: AppRoutes.uploadMethod,
      page: () => UploadMethodView(),
      binding: UploadMethodBinding(),
    ),
    GetPage(
      name: AppRoutes.recordSound,
      page: () => RecordSoundView(),
      binding: RecordSoundBinding(),
    ),
    GetPage(
      name: AppRoutes.changeVoice,
      page: () => ChangeVoiceView(),
      binding: ChangeVoiceBinding(),
    ),
    GetPage(
      name: AppRoutes.playSound,
      page: () => PlaySoundView(),
      binding: PlaySoundBinding(),
      transitionDuration: const Duration(milliseconds: 200),
      transition: Transition.downToUp,
      curve: Curves.easeIn,
    ),
    GetPage(
      name: AppRoutes.about,
      page: () => AboutView(),
      binding: AboutBinding(),
    ),
    GetPage(
      name: AppRoutes.privacy,
      page: () => WebPageView(),
      binding: WebPageBinding(),
    ),
    GetPage(
      name: AppRoutes.terms,
      page: () => WebPageView(),
      binding: WebPageBinding(),
    ),

    /// SideB
    GetPage(
      name: AppRoutes.initialB,
      page: () => initial_view_b.InitialView(),
      bindings: [
        initial_binding_b.InitialBinding(),
        home_binding_b.HomeBinding(),
        SearchMusicBinding(),
        PersonalMusicLibraryBinding(),
        PlaylistsBinding(),
        CollectPlaylistsBinding(),
      ],
    ),
    GetPage(
      name: AppRoutes.playPage,
      page: () => PlayPageView(),
      binding: PlayPageBinding(),
      transitionDuration: const Duration(milliseconds: 200),
      transition: Transition.downToUp,
      curve: Curves.easeIn,
    ),
    GetPage(
      name: AppRoutes.album,
      page: () => AlbumView(),
      binding: AlbumBinding(),
    ),
    GetPage(
      name: AppRoutes.loveSongs,
      page: () => LoveSongsView(),
      binding: LoveSongsBinding(),
    ),
  ];
}
