import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:web_panel/routs/rout_name.dart';

import '../screens/dashboard/dashboard_screen.dart';
import '../screens/device management/device.dart';
import '../screens/device management/device_details_screen.dart';
import '../screens/login/login_screen.dart';
import '../screens/main/main_screen.dart';
import '../screens/ticket/ticket_screen.dart';
import '../services/auth_guard.dart';

class Rout {
  static List<GetPage<dynamic>>? getPages = [
    GetPage(name: RoutName.login, page: () => LoginScreen()),
    // GetPage(name: RoutName.mainPage, page: () => MainScreen()),
    GetPage(
      name: RoutName.dashBoard,
      page: () => MainScreen(routName: RoutName.dashBoard),
      transition: Transition.noTransition,
      middlewares: [AuthGuard()],
    ),
    GetPage(
      name: RoutName.device,
      page: () => MainScreen(routName: RoutName.device),
      transition: Transition.noTransition,
      middlewares: [AuthGuard()],
    ),
    GetPage(name: RoutName.deviceDetails, page: () => DeviceDetailsScreen(),middlewares: [AuthGuard()],),
    GetPage(
      name: RoutName.ticket,
      page: () => MainScreen(routName: RoutName.ticket),
      transition: Transition.noTransition,
      middlewares: [AuthGuard()],
    ),
    // GetPage(
    //   name: RoutName.login,
    //   page: () => LoginScreen(), // contains Drawer + nested Navigator
    //   children: [
    //       GetPage(
    //       name: RoutName.dashBoard,
    //       page: () => MainScreen(routName: RoutName.dashBoard),
    //       transition: Transition.noTransition,
    //     ),
    //     GetPage(
    //       name: RoutName.device,
    //       page: () => MainScreen(routName: RoutName.device),
    //       transition: Transition.noTransition,
    //     ),
    //     GetPage(
    //       name: RoutName.ticket,
    //       page: () => MainScreen(routName: RoutName.ticket),
    //       transition: Transition.noTransition,
    //     ),
    //     GetPage(name: RoutName.deviceDetails, page: () => DeviceDetailsScreen()),
    //
    //   ],
    // ),
  ];
}
