// app/_layout.tsx
import { NavigationContainer } from '@react-navigation/native';
import { Stack } from 'expo-router';
import { StatusBar } from 'expo-status-bar';
import { ThemeProvider, useTheme } from '../themecontext';

function RootLayoutContent() {
  const { isDarkMode } = useTheme();
  return (
    <>
      <StatusBar style={isDarkMode ? "light" : "dark"} />
      <Stack screenOptions={{ headerShown: false }}>
        {/* Removido o .tsx do name, o Expo Router usa apenas o nome do ficheiro */}
        <Stack.Screen name="index" /> 
      </Stack>
    </>
  );
}

export default function RootLayout() {
  return (
    <ThemeProvider>
      <RootLayoutContent />
    </ThemeProvider>
  );
}

<ThemeProvider>
  <NavigationContainer children={undefined}>
    {/* aluno e professor */}
  </NavigationContainer>
</ThemeProvider>
