import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import { LicenseProvider } from "./contexts/LicenseContext";
import { ProfileProvider } from "./contexts/ProfileContext";
import ErrorBoundary from "./components/shared/ErrorBoundary";
import { initLogCapture } from "./services/logService";
import "./i18n/config";
import "./styles.css";

initLogCapture();

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
  <React.StrictMode>
    <LicenseProvider>
      <ProfileProvider>
        <ErrorBoundary>
          <App />
        </ErrorBoundary>
      </ProfileProvider>
    </LicenseProvider>
  </React.StrictMode>,
);
