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),

    // Auth
    AutoRoute(page: LoginRoute.page),

    // Main
    AutoRoute(
      page: MainRoute.page,
      children: [
        AutoRoute(page: HomeRoute.page, initial: true),
        AutoRoute(page: TableRoute.page),
        AutoRoute(page: ReportRoute.page),
        AutoRoute(page: CustomerRoute.page),
        AutoRoute(page: SettingRoute.page),
      ],
    ),

    // Sync
    AutoRoute(page: SyncRoute.page),

    // Checkout
    AutoRoute(page: CheckoutRoute.page),

    // Order
    AutoRoute(page: OrderRoute.page),
    AutoRoute(page: SuccessOrderRoute.page),
    AutoRoute(page: SuccessAddItemOrderRoute.page),

    // Payment
    AutoRoute(page: PaymentRoute.page),
    AutoRoute(page: PaymentSuccessRoute.page),
    AutoRoute(page: PaymentSuccessSplitBillRoute.page),

    // Void
    AutoRoute(page: VoidRoute.page),
    AutoRoute(page: VoidSuccessRoute.page),

    // Split Bill
    AutoRoute(page: SplitBillRoute.page),

    // Refund
    AutoRoute(page: RefundRoute.page),
    AutoRoute(page: RefundSuccessRoute.page),
  ];
}
