import React from "react";
import ReactDOM from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import App from "./App";
import { AuthProvider } from "./auth";
import { SettingsProvider } from "./settings";
import { ConfirmProvider } from "./confirm";
import { ToastProvider } from "./toast";
import "./styles.css";
import { applyFavicon } from "./branding";

// Eigenes Favicon, falls hinterlegt - bewusst vor dem Login.
applyFavicon();

ReactDOM.createRoot(document.getElementById("root")).render(
  <React.StrictMode>
    <BrowserRouter>
      <AuthProvider>
        <SettingsProvider>
          <ConfirmProvider>
            <ToastProvider>
              <App />
            </ToastProvider>
          </ConfirmProvider>
        </SettingsProvider>
      </AuthProvider>
    </BrowserRouter>
  </React.StrictMode>
);
