import React from 'react';
import logo from './logo.svg';
import './App.css';
import { ReactKeycloakProvider } from '@react-keycloak/web'
import keycloak from './keycloak'
import Login from './components/login';
import { LocalDataProvider } from './provider/LocalDataProvider';
import ENT from './components/ent';
import CreateSession from './components/createSession'


const keycloakInitOptions = {
  onLoad: 'login-required',
  checkLoginIframe: false
}

function App() {
  return (
    <ReactKeycloakProvider authClient={keycloak} /*initOptions={keycloakInitOptions}*/>
      <LocalDataProvider>
        <div className="App">
          <header className="App-header">
            <img src={logo} className="App-logo" alt="logo" />
            <p>
              Edit <code>src/App.tsx</code> and save to reload.
            </p>
            <a
              className="App-link"
              href="https://reactjs.org"
              target="_blank"
              rel="noopener noreferrer"
            >
              Learn React
            </a>
            <Login/>
            <ENT/>
            <CreateSession/>
          </header>
        </div>
      </LocalDataProvider>
    </ReactKeycloakProvider>
  );
}

export default App;
