import 'package:chat/views/home/index_page.dart';
import 'package:chat/views/public/app_page.dart';
import 'package:chat/views/public/scan_page.dart';
import 'package:chat/views/public/transit_page.dart';
import 'package:chat/views/search/index_page.dart';
import 'package:get/get.dart';

/// 这里是为了定义别名路由的名称，
/// 具体映射关系，在app_router 的 getPages 中实现
abstract class AppRoutes {
  static const String app = '/';
  static const String transit = '/transit';
  static const String notfound = '/notfound';
  static const String scan = '/scan';

  static const String home = '/home';
  static const String search = '/search';

  static GetPage router = GetPage(
    name: '/',
    page: () => AppPage(),
    children: [
      GetPage(
        name: AppRoutes.transit,
        page: () => const TransitPage(),
      ),
      GetPage(
        name: AppRoutes.scan,
        page: () => const ScanPage(),
      ),
      GetPage(
        name: AppRoutes.home,
        page: () => const HomePage(),
      ),
      GetPage(
        name: AppRoutes.search,
        page: () => const SearchPage(),
      ),
    ],
  );
}
