import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import "./styles/igny8-colors.css"; /* IGNY8 custom colors - separate from TailAdmin */
import "swiper/swiper-bundle.css";
import "flatpickr/dist/flatpickr.css";
import App from "./App";
import { ThemeProvider } from "./context/ThemeContext";
import { ToastProvider } from "./components/ui/toast/ToastContainer";
import { HeaderMetricsProvider } from "./context/HeaderMetricsContext";
import { ErrorBoundary } from "./components/common/ErrorBoundary";
import { BrowserRouter } from "react-router-dom";

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <ErrorBoundary>
      <ThemeProvider>
        <HeaderMetricsProvider>
          <ToastProvider>
            <BrowserRouter>
              <App />
            </BrowserRouter>
          </ToastProvider>
        </HeaderMetricsProvider>
      </ThemeProvider>
    </ErrorBoundary>
  </StrictMode>,
);
