import Constants from "expo-constants"; import type { NativeStackNavigationOptions } from "@react-navigation/native-stack"; import { Platform, View } from "react-native"; import { AppText as Text } from "./AppText"; import { T3Wordmark } from "./T3Wordmark"; import { IPAD_HOME_TITLE_OFFSET } from "../lib/layoutMetrics"; import { resolveMobileStageLabel } from "../lib/mobileBranding"; /** * Horizontal correction applied to content rendered in the brand title slot, * shared with the connection-status swap so both align identically. */ export function brandTitleOffset(): number { if (Platform.OS !== "ios") return 0; return Platform.isPad ? IPAD_HOME_TITLE_OFFSET : 0; } /** * Compact brand lockup sized for native navigation bars. */ export function CompactBrandTitle( props: { readonly allowFontScaling?: boolean; } = {}, ) { const stageLabel = resolveMobileStageLabel(Constants.expoConfig?.extra?.appVariant); const titleOffset = brandTitleOffset(); return ( Code {stageLabel} ); } export function renderCompactBrandTitle() { return ; } export function getCompactBrandHeaderOptions( fallbackTitleStyle?: NativeStackNavigationOptions["headerTitleStyle"], ): NativeStackNavigationOptions { return { headerTitle: renderCompactBrandTitle, headerTitleStyle: fallbackTitleStyle, title: "Threads", unstable_headerLeftItems: undefined, }; }