import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom'
import { Layout } from './components/Layout'
import { HomePage } from './pages/Home'
import { BrandPage } from './pages/Brand'
import { PoetryPage } from './pages/Poetry'
import { QingxiangPage } from './pages/Qingxiang'
import { HaokePage } from './pages/Haoke'
import { SystemPage } from './pages/System'
import { TechPage } from './pages/Tech'
import { SubsidyPage } from './pages/Subsidy'
import { PartnerPage } from './pages/Partner'
import { TechDetailPage } from './pages/TechDetail'
import { ContactPage } from './pages/Contact'
import { DeepPage } from './pages/DeepPage'

export default function App() {
  return (
    <BrowserRouter>
      <Routes>
        <Route element={<Layout />}>
          <Route index element={<HomePage />} />
          <Route path="brand" element={<BrandPage />} />
          <Route path="poetry" element={<PoetryPage />} />
          <Route path="qingxiang" element={<QingxiangPage />} />
          <Route path="haoke" element={<HaokePage />} />
          <Route path="system" element={<SystemPage />} />
          <Route path="tech" element={<TechPage />} />
          <Route path="subsidy" element={<SubsidyPage />} />
          <Route path="partner" element={<PartnerPage />} />
          <Route path="tech-detail" element={<TechDetailPage />} />
          <Route path="contact" element={<ContactPage />} />
          <Route path="culture/:slug" element={<DeepPage />} />
          <Route path="poetry/:slug" element={<DeepPage />} />
          <Route path="qingxiang/:slug" element={<DeepPage />} />
          <Route path="*" element={<Navigate to="/" replace />} />
        </Route>
      </Routes>
    </BrowserRouter>
  )
}
