import { Link, Stack } from "expo-router";
import { StatusBar } from "expo-status-bar";
import { C } from "../lib/theme";

export default function RootLayout() {
  return (
    <>
      <StatusBar style="light" />
      <Stack
        screenOptions={{
          headerStyle: { backgroundColor: C.bg },
          headerTintColor: C.text,
          headerShadowVisible: false,
          contentStyle: { backgroundColor: C.bg },
        }}
      >
        <Stack.Screen
          name="index"
          options={{
            title: "GTD",
            headerRight: () => (
              <Link href="/settings" style={{ paddingHorizontal: 8, fontSize: 18 }}>
                ⚙️
              </Link>
            ),
          }}
        />
        <Stack.Screen name="list/[status]" />
        <Stack.Screen name="projects" options={{ title: "Projects" }} />
        <Stack.Screen name="task/[id]" options={{ title: "Clarify", presentation: "modal" }} />
        <Stack.Screen name="project/[id]" options={{ title: "Project" }} />
        <Stack.Screen name="settings" options={{ title: "Settings", presentation: "modal" }} />
      </Stack>
    </>
  );
}
