import { Suspense } from "react";
import { Routes, Route } from "react-router-dom";
import AdminApp from "./admin/AdminApp";

function AdminLoader() {
  return (
    <div
      style={{
        minHeight: "100dvh",
        display: "flex",
        alignItems: "center",
        justifyContent: "center",
        background: "var(--bg-primary)",
      }}
    >
      <div className="admin-spinner" />
    </div>
  );
}

export default function App() {
  return (
    <Suspense fallback={<AdminLoader />}>
      <Routes>
        <Route path="/*" element={<AdminApp />} />
      </Routes>
    </Suspense>
  );
}
