import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App';
import {
  createBrowserRouter,
  createRoutesFromElements,
  Route,
  RouterProvider,
} from "react-router";
import Dashboard from "./pages/dashboard/Dashboard";
import Team from "./pages/Team/Team";
import Contacts from "./pages/Contacts/Contacts";
import Invoices from "./pages/Invoices/Invoices";
import Profile from "./pages/Profile";
import Calendar from "./pages/Calendar/Calendar";
import FAQ from "./pages/FAQ";
import BarChart from "./pages/barChart/BarChart ";
import PieChart from "./pages/pieChart/PieChart";
import LineChart from "./pages/lineChart/LineChart";
import Geography from "./pages/geography/Geography";
import NotFound from "./pages/NotFound ";
let router = createBrowserRouter(
  createRoutesFromElements(
    <Route path="/" element={<App />}>
      <Route index element={<Dashboard />}/>
      <Route path="team" element={<Team />}/>
      <Route path="contacts" element={<Contacts />}/>
      <Route path="invoices" element={<Invoices />}/>
      <Route path="form" element={<Profile />}/>
      <Route path="calendar" element={<Calendar />}/>
      <Route path="faq" element={<FAQ />}/>
      <Route path="bar" element={<BarChart />}/>
      <Route path="pie" element={<PieChart />} />
      <Route path="line" element={<LineChart />}/>
      <Route path="geography" element={<Geography />}/>
      <Route path="*" element={<NotFound />}/>
    </Route>
  )
);
createRoot(document.getElementById('root')).render(
  <StrictMode>
    <RouterProvider router={router} />,
  </StrictMode>,
)
