import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import './app/globals.css'
import Home from './app/page'
import BlogListing from './app/blog/page'
import BlogPost from './app/blog/[slug]/ClientPage'
import AdminLogin from './app/admin/login'
import AdminDashboard from './app/admin/dashboard'
import AdminEditor from './app/admin/editor'
import PrivacyPolicy from './app/privacidad/page'
import TermsOfService from './app/terminos/page'
import CookieBanner from './components/CookieBanner'

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <BrowserRouter>
      <CookieBanner />
      <Routes>
        <Route path="/" element={<Home />} />
        <Route path="/blog" element={<BlogListing />} />
        <Route path="/blog/:slug" element={<BlogPost />} />
        <Route path="/admin" element={<AdminLogin />} />
        <Route path="/admin/dashboard" element={<AdminDashboard />} />
        <Route path="/admin/editor" element={<AdminEditor />} />
        <Route path="/privacidad" element={<PrivacyPolicy />} />
        <Route path="/terminos" element={<TermsOfService />} />
      </Routes>
    </BrowserRouter>
  </StrictMode>,
)
