import { StyleSheet, Text, View } from 'react-native' import { colors, radii, spacing, typography } from '../theme/mobile-theme' import type { MobileWebShellSessionState } from './mobile-web-shell-session-contract' import { formatMobileWebShellDevFacts, isDevelopmentBuild } from './mobile-web-shell-dev-facts' /** The generation a development build is showing, pinned in a corner of the page. */ export function ShellDevFacts({ state, droppedBinaryFrames }: { state: Extract droppedBinaryFrames: number }) { if (!isDevelopmentBuild()) { return null } return ( {formatMobileWebShellDevFacts({ buildId: state.buildId, totalBytes: state.totalBytes, elapsedMs: state.elapsedMs, droppedBinaryFrames })} ) } const styles = StyleSheet.create({ devFacts: { position: 'absolute', left: spacing.sm, bottom: spacing.sm, paddingHorizontal: spacing.sm, paddingVertical: 2, borderRadius: radii.button, backgroundColor: colors.bgPanel }, devFactsText: { fontSize: typography.metaSize, color: colors.textMuted } })