import { Tabs } from "expo-router";
import { useAppStore } from "../../hooks/useAppStore";

export default function TabsLayout() {
    const serverPort = useAppStore((s) => s.serverPort);
  return (
    <Tabs
    screenOptions={{
        headerShown: false, // Hides the header for all screens in this navigator
      }}>
      <Tabs.Screen name="scanner" options={{ title: "Scan" }} />
      <Tabs.Screen name="config" options={{ title: "settings" }} />
      <Tabs.Screen name="logs" options={{ title: "Logs",
        href: parseInt(serverPort || "0", 10) >= 50000 ? null : "/(tabs)/logs",
       }} 
      />
    </Tabs>
  );
}