import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import type { FeatureStatus } from '../../types/debug'; import { t, type TranslationKey } from '../../i18n'; import { Colors } from '../theme/colors'; import { FontSize, Spacing } from '../theme/layout'; export function FeatureStatusView({ name, status }: { name: string; status: FeatureStatus }) { if (status.phase === 'ready') { return null; } const hint = `status.hint.${name}` as TranslationKey; return ( {t(`status.${status.phase}` as TranslationKey)} {status.phase === 'empty' && {t(hint)}} {status.issues.map((issue, index) => {`${issue.path}: ${issue.message}`})} ); } const styles = StyleSheet.create({ container: { padding: Spacing.MD, gap: Spacing.XS }, title: { color: Colors.text, fontSize: FontSize.SM }, message: { color: Colors.textSecondary, fontSize: FontSize.XS }, });