import { createRoot } from "react-dom/client";
import { GoogleOAuthProvider } from "@react-oauth/google";
import AuthGate from "./auth/AuthGate.jsx";
import { GOOGLE_CLIENT_ID } from "./auth/authConfig.js";
import { AppProvider } from "./state/AppContext.jsx";
import App from "./App.jsx";
import "./styles/global.css";

createRoot(document.getElementById("root")).render(
  <GoogleOAuthProvider clientId={GOOGLE_CLIENT_ID}>
    <AuthGate>
      <AppProvider>
        <App />
      </AppProvider>
    </AuthGate>
  </GoogleOAuthProvider>
);
