import 'package:auto_route/auto_route.dart';
import 'app_router.gr.dart';

@AutoRouterConfig()
class AppRouter extends RootStackRouter {
  @override
  List<AutoRoute> get routes => [
    // Splash
    AutoRoute(page: SplashRoute.page, initial: true),

    // Onboarding
    AutoRoute(page: OnboardingRoute.page),

    // Auth
    AutoRoute(page: LoginRoute.page),
    AutoRoute(page: RegisterRoute.page),
    AutoRoute(page: OtpRoute.page),
    AutoRoute(page: PinRoute.page),
    AutoRoute(page: CreatePasswordRoute.page),
    AutoRoute(page: PasswordRoute.page),

    // Main
    AutoRoute(
      page: MainRoute.page,
      children: [
        AutoRoute(page: HomeRoute.page),
        AutoRoute(page: VoucherRoute.page),
        AutoRoute(page: OrderRoute.page),
        AutoRoute(page: ProfileRoute.page),
      ],
    ),

    // Merchant
    AutoRoute(page: MerchantRoute.page),
    AutoRoute(page: MerchantDetailRoute.page),

    // Point
    AutoRoute(page: PoinRoute.page),
    AutoRoute(page: PoinHistoryRoute.page),
    AutoRoute(page: ProductRedeemRoute.page),

    // Draw
    AutoRoute(page: DrawRoute.page),
    AutoRoute(
      page: DrawDetailRoute.page,
      children: [
        AutoRoute(page: DrawTodayRoute.page),
        AutoRoute(page: DrawMyNumberRoute.page),
        AutoRoute(page: DrawWinnerRoute.page),
        AutoRoute(page: DrawInfoRoute.page),
      ],
    ),

    // Voucher
    AutoRoute(page: VoucherDetailRoute.page),

    // Notification
    AutoRoute(page: NotificationRoute.page),

    // Order
    AutoRoute(page: OrderDetailRoute.page),

    // Reward
    AutoRoute(page: RewardRoute.page),

    // Account
    AutoRoute(page: AccountMyRoute.page),
    AutoRoute(page: AddressRoute.page),
    AutoRoute(page: PaymentRoute.page),

    // Mini Games
    AutoRoute(page: FerrisWheelRoute.page),
  ];
}
