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.tsx";
import { ThemeProvider } from "./context/ThemeContext.tsx";
import { ToastProvider } from "./components/ui/toast/ToastContainer.tsx";
import { HeaderMetricsProvider } from "./context/HeaderMetricsContext.tsx";
import { ErrorBoundary } from "./components/common/ErrorBoundary.tsx";

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