import 'package:go_router/go_router.dart';

import '../../features/auth/ui/screens/login_email_screen.dart';
import '../../features/auth/ui/screens/login_password_screen.dart';
import '../../features/auth/ui/screens/login_code_screen.dart';
import '../../features/auth/ui/screens/register_screen.dart';
import '../../features/auth/ui/screens/register_step2_screen.dart';
import '../../features/home/ui/screens/home_screen.dart';
import '../../features/messages/ui/screens/message_invite_list_screen.dart';
import '../../features/messages/ui/screens/message_invite_detail_screen.dart';
import '../../features/contacts/ui/screens/contacts_screen.dart';
import '../../features/contacts/ui/screens/add_contact_screen.dart';
import '../../features/calendar/ui/screens/calendar_dayweek_screen.dart';
import '../../features/calendar/ui/screens/calendar_month_screen.dart';
import '../../features/calendar/ui/screens/calendar_event_detail_screen.dart';
import '../../features/todo/ui/screens/todo_quadrants_screen.dart';
import '../../features/todo/ui/screens/todo_detail_screen.dart';
import '../../features/settings/ui/screens/settings_screen.dart';
import '../../features/settings/ui/screens/features_screen.dart';
import '../../features/settings/ui/screens/memory_screen.dart';
import '../../features/settings/ui/screens/account_screen.dart';

final appRouter = GoRouter(
  initialLocation: '/',
  routes: [
    GoRoute(path: '/', builder: (context, state) => const LoginEmailScreen()),
    GoRoute(
      path: '/login/password',
      builder: (context, state) => const LoginPasswordScreen(),
    ),
    GoRoute(
      path: '/login/code',
      builder: (context, state) => const LoginCodeScreen(),
    ),
    GoRoute(
      path: '/register',
      builder: (context, state) => const RegisterScreen(),
    ),
    GoRoute(
      path: '/register/step2',
      builder: (context, state) => const RegisterStep2Screen(),
    ),
    GoRoute(path: '/home', builder: (context, state) => const HomeScreen()),
    GoRoute(
      path: '/messages/invites',
      builder: (context, state) => const MessageInviteListScreen(),
    ),
    GoRoute(
      path: '/messages/invites/:id',
      builder: (context, state) => const MessageInviteDetailScreen(),
    ),
    GoRoute(
      path: '/contacts',
      builder: (context, state) => const ContactsScreen(),
    ),
    GoRoute(
      path: '/contacts/add',
      builder: (context, state) => const AddContactScreen(),
    ),
    GoRoute(
      path: '/calendar/dayweek',
      builder: (context, state) => const CalendarDayWeekScreen(),
    ),
    GoRoute(
      path: '/calendar/month',
      builder: (context, state) => const CalendarMonthScreen(),
    ),
    GoRoute(
      path: '/calendar/events/:id',
      builder: (context, state) => const CalendarEventDetailScreen(),
    ),
    GoRoute(
      path: '/todo',
      builder: (context, state) => const TodoQuadrantsScreen(),
    ),
    GoRoute(
      path: '/todo/:id',
      builder: (context, state) => const TodoDetailScreen(),
    ),
    GoRoute(
      path: '/settings',
      builder: (context, state) => const SettingsScreen(),
    ),
    GoRoute(
      path: '/settings/features',
      builder: (context, state) => const FeaturesScreen(),
    ),
    GoRoute(
      path: '/settings/memory',
      builder: (context, state) => const MemoryScreen(),
    ),
    GoRoute(
      path: '/settings/account',
      builder: (context, state) => const AccountScreen(),
    ),
  ],
);
