import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'
import { ThemeBrowser, ThemeDetailPage, LayoutDetailPage, LayoutPreviewPage } from './components/themes'
import { NewPresentationPage, PresentationViewer, PresentationEditor, SlideEditor, PresentationsList } from './components/presentations'
import { AppHeader } from './components/AppHeader'
import { Welcome } from './components/Welcome'
import './App.css'
import './components/themes/ThemeBrowser.css'

function App() {
  return (
    <Router>
      <div className="app-root">
        <AppHeader />
        <main className="app-main">
          <Routes>
            <Route path="/" element={<Welcome />} />
            <Route path="/presentations" element={<PresentationsList />} />
            <Route path="/presentations/new" element={<NewPresentationPage />} />
            <Route path="/presentations/:presentationId/edit/slides/:slideNumber" element={<PresentationEditor />} />
            <Route path="/presentations/:presentationId/view/slides/:slideNumber" element={<PresentationViewer />} />
            <Route path="/presentations/:presentationId/slide/:slideId/edit" element={<SlideEditor />} />
            <Route path="/themes" element={<ThemeBrowser />} />
            <Route path="/themes/:themeId" element={<ThemeDetailPage />} />
            <Route path="/themes/:themeId/layouts/:layoutId" element={<LayoutDetailPage />} />
            <Route path="/themes/:themeId/layouts/:layoutId/preview" element={<LayoutPreviewPage />} />
          </Routes>
        </main>
      </div>
    </Router>
  )
}

export default App
