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

import '../../modules/notice_board/page/notice_board_page.dart';
import '../../modules/announ/page/announ_page.dart';
import '../../modules/event/page/event_page.dart';
import '../../modules/documents/page/documents_page.dart';
import '../../modules/announcement_detail/page/announcement_detail_page.dart';
import '../../modules/event_detail/page/event_detail_page.dart';
import '../../modules/documents_list/page/documents_list_page.dart';

part 'notice_board_page_router.gr.dart';

/*
 * NoticeBoard 模块的路由
 */
@AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute')
class NoticeBoardPageRouter extends _$NoticeBoardPageRouter {
  @override
  List<AutoRoute> get routes => [
        CustomRoute(
            page: NoticeBoardPageRoute.page,
            path: RouterPath.noticeBoard,
            transitionsBuilder: applySlideTransition,
            children: [
              CustomRoute(
                page: AnnounPageRoute.page,
                path: RouterPath.announ,
                transitionsBuilder: applySlideTransition,
              ),
              CustomRoute(
                page: EventPageRoute.page,
                path: RouterPath.event,
                transitionsBuilder: applySlideTransition,
              ),
              CustomRoute(
                page: DocumentsPageRoute.page,
                path: RouterPath.documents,
                transitionsBuilder: applySlideTransition,
              ),
            ]),
            CustomRoute(
            page: AnnouncementDetailPageRoute.page,
            path: RouterPath.announcementDetail,
            transitionsBuilder: applySlideTransition,
            children: []),
            CustomRoute(
            page: EventDetailPageRoute.page,
            path: RouterPath.eventDetail,
            transitionsBuilder: applySlideTransition,
            children: []),
            CustomRoute(
            page: DocumentsListPageRoute.page,
            path: RouterPath.documentsList,
            transitionsBuilder: applySlideTransition,
            children: []),
      ];
}
