import { StrictMode } from "react";
import { createRoot } from "react-dom/client";

import { App } from "./App";
import { LocaleProvider } from "./i18n/LocaleProvider";
import { EulaModalProvider } from "./providers/EulaModalProvider";
import { ExchangeRateProvider } from "./providers/ExchangeRateProvider";
import "./styles/global.css";

const rootEl = document.getElementById("root");
if (!rootEl) {
  throw new Error("Root element #root not found");
}

createRoot(rootEl).render(
  <StrictMode>
    <LocaleProvider>
      <ExchangeRateProvider>
        <EulaModalProvider>
          <App />
        </EulaModalProvider>
      </ExchangeRateProvider>
    </LocaleProvider>
  </StrictMode>,
);
