import React, { useEffect } from 'react';
import { Routes, Route } from 'react-router-dom';
import { Home, Profile, Schedule, Settings } from '@src/pages';
import { Shell } from '@components';
import { useLocalStore } from '@components';

const AppRouter = () => {
  const { setUser } = useLocalStore();

  useEffect(() => {
    setUser({
      firstName: 'ShiftSync',
      lastName: 'Test-User',
      email: 'testuser@shift-sync.com',
      scheduler: false,
      manager: true,
      isAdmin: false
    })
  }, []);

  return (
    <Shell>
      <Routes>
        <Route path="/" element={<Home />} />
        <Route path="/schedule" element={<Schedule />} />
        <Route path="/settings" element={<Settings />} />
        <Route path="/profile" element={<Profile />} />
      </Routes>
    </Shell>
  );
};

export default AppRouter
