import { StrictMode } from 'react'
// import { createRoot } from 'react-dom/client'
import { BrowserRouter } from 'react-router-dom';
import './index.css'
import App from './App.jsx'
import ReactDOM from "react-dom/client";
// import App from "./App";

import {
  PublicClientApplication
} from "@azure/msal-browser";

import {
  MsalProvider
} from "@azure/msal-react";

import { msalConfig } from "./auth/msalConfig.js";

const msalInstance =
  new PublicClientApplication(msalConfig);

ReactDOM.createRoot(document.getElementById("root"))
  //createRoot(document.getElementById('root')).render(
  .render(
    <StrictMode>
      <BrowserRouter>
        <MsalProvider instance={msalInstance}>
          <App /></MsalProvider>
      </BrowserRouter>
    </StrictMode>
    // <MsalProvider instance={msalInstance}>
    //   <App />
    // </MsalProvider>
  );

// createRoot(document.getElementById('root')).render(
//   <StrictMode>
//     <BrowserRouter>
//       <App />
//     </BrowserRouter>
//   </StrictMode>,
// )
