import { Stack } from 'expo-router'

// Public-flow nested stack. The pre-auth screens (`login`, `handleSignup`,
// `verificationCode`) all live here so they share one navigator with an
// explicit `initialRouteName`. Without this, declaring an always-available
// route between two `<Stack.Protected>` blocks at the root would leave the
// implicit-initial-route ambiguous: under the React Navigation native-stack,
// pushing back into a route that is *also* the implicit initial after a
// Sign Up → Back round-trip can collapse the stack and paint the container
// background — visible to the user as a black screen.
//
// The `handleLogin` / `verifyEmail` screens that were previously in this
// group have moved to `(shared-auth)/` so they're reachable from both auth
// states (first-time sign-in *and* Settings → Accounts → Add account).
export const unstable_settings = {
  initialRouteName: 'login',
}

export default function PublicLayout() {
  return <Stack screenOptions={{ headerShown: false }} />
}
