import { useState } from 'react';
import SimpleTable from "./components/SimpleTable";
import GestionSectores from "./components/GestionSectores";
import GestionComponentes from './components/GestionComponentes';
import Navbar from './components/Navbar';
import './App.css';

export type View = 'equipos' | 'sectores' | 'admin';

function App() {
  const [currentView, setCurrentView] = useState<View>('equipos');

  return (
    <>
      <Navbar currentView={currentView} setCurrentView={setCurrentView} />
      
      <main>
        {currentView === 'equipos' && <SimpleTable />}
        {currentView === 'sectores' && <GestionSectores />}
        {currentView === 'admin' && <GestionComponentes />}
      </main>
    </>
  );
}

export default App;