import 'package:auto_route/auto_route.dart';
import 'package:domain/entity/rewards_buy_entity.dart';
import 'package:flutter/material.dart';
import 'package:router/ext/auto_router_extensions.dart';
import 'package:router/path/router_path.dart';

import '../../modules/rewards/rewards_page.dart';
import '../../modules/rewards_my/rewards_my_page.dart';
import '../../modules/rewards_my/rewards_my_active/rewards_my_active_page.dart';
import '../../modules/rewards_my/rewards_my_expired/rewards_my_expired_page.dart';
import '../../modules/rewards_my/rewards_my_used/rewards_my_used_page.dart';
import '../../modules/rewards_list/rewards_list_page.dart';
import '../../modules/rewards_address/rewards_address_page.dart';
import '../../modules/rewards_code/rewards_code_page.dart';
import '../../modules/rewards_detail/rewards_detail_page.dart';
import '../../modules/rewards_confirm/rewards_confirm_page.dart';
import '../../modules/rewards_successful/rewards_successful_page.dart';
import '../../modules/rewards_redeem/rewards_redeem_page.dart';
import '../../modules/rewards_transaction/rewards_transaction_page.dart';
import '../../modules/rewards_home/rewards_home_page.dart';
import '../../modules/rewards_search/rewards_search_page.dart';

import '../../modules/rewards_history/rewards_history_page.dart';
import '../../modules/rewards_history/rewards_history_earned/rewards_history_earned_page.dart';
import '../../modules/rewards_history/rewards_history_spent/rewards_history_spent_page.dart';

part 'rewards_page_router.gr.dart';

/*\
 * rewards 模块的路由
 */
@AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute')
class RewardsPageRouter extends _$RewardsPageRouter {
  @override
  List<AutoRoute> get routes => [
        CustomRoute(
            page: RewardsPageRoute.page,
            path: RouterPath.rewards,
            transitionsBuilder: applySlideTransition),
        CustomRoute(
            page: RewardsMyPageRoute.page,
            path: RouterPath.rewardsMy,
            transitionsBuilder: applySlideTransition,
            children: [
              CustomRoute(
                  page: RewardsMyActivePageRoute.page,
                  path: RouterPath.rewardsMyActive,
                  transitionsBuilder: applySlideTransition),
                  CustomRoute(
                  page: RewardsMyExpiredPageRoute.page,
                  path: RouterPath.rewardsMyExpired,
                  transitionsBuilder: applySlideTransition),
                  CustomRoute(
                  page: RewardsMyUsedPageRoute.page,
                  path: RouterPath.rewardsMyUsed,
                  transitionsBuilder: applySlideTransition),
            ]),
            CustomRoute(
            page: RewardsHistoryPageRoute.page,
            path: RouterPath.rewardsHistory,
            transitionsBuilder: applySlideTransition,
            children: [
              CustomRoute(
                  page: RewardsHistoryEarnedPageRoute.page,
                  path: RouterPath.rewardsHistoryEarned,
                  transitionsBuilder: applySlideTransition),
              CustomRoute(
                  page: RewardsHistorySpentPageRoute.page,
                  path: RouterPath.rewardsHistorySpent,
                  transitionsBuilder: applySlideTransition),
            ]),
            CustomRoute(
            page: RewardsListPageRoute.page,
            path: RouterPath.rewardsList,
            transitionsBuilder: applySlideTransition),
            CustomRoute(
            page: RewardsAddressPageRoute.page,
            path: RouterPath.rewardsAddress,
            transitionsBuilder: applySlideTransition),
            CustomRoute(
            page: RewardsCodePageRoute.page,
            path: RouterPath.rewardsCode,
            transitionsBuilder: applySlideTransition),
            CustomRoute(
            page: RewardsDetailPageRoute.page,
            path: RouterPath.rewardsDetail,
            transitionsBuilder: applySlideTransition),
            CustomRoute(
            page: RewardsConfirmPageRoute.page,
            path: RouterPath.rewardsConfirm,
            transitionsBuilder: applySlideTransition),
            CustomRoute(
            page: RewardsSuccessfulPageRoute.page,
            path: RouterPath.rewardsSuccessful,
            transitionsBuilder: applySlideTransition),
            CustomRoute(
            page: RewardsRedeemPageRoute.page,
            path: RouterPath.rewardsRedeem,
            transitionsBuilder: applySlideTransition),
            CustomRoute(
            page: RewardsTransactionPageRoute.page,
            path: RouterPath.rewardsTransaction,
            transitionsBuilder: applySlideTransition),
             CustomRoute(
            page: RewardsTransactionPageRoute.page,
            path: RouterPath.rewardsTransaction,
            transitionsBuilder: applySlideTransition),
            CustomRoute(
            page: RewardsHomePageRoute.page,
            path: RouterPath.rewardsHome,
            transitionsBuilder: applySlideTransition),
            CustomRoute(
            page: RewardsSearchPageRoute.page,
            path: RouterPath.rewardsSearch,
            transitionsBuilder: applySlideTransition),
      ];
}
