import { ROUTES } from '@/constants/Routes'; import { useI18n } from '@/hooks/useI18n'; import { Ionicons } from '@expo/vector-icons'; import { useRouter } from 'expo-router'; import React from 'react'; import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; type BasicInfoTabProps = { healthData: { bmi: string; height: string; weight: string; waist: string; }; }; export function BasicInfoTab({ healthData }: BasicInfoTabProps) { const { t } = useI18n(); const router = useRouter(); const handleHeightWeightPress = () => { router.push(ROUTES.PROFILE_EDIT); }; const handleWaistPress = () => { router.push('/circumference-detail'); }; return ( {t('health.tabs.healthProfile.basicInfoCard.title')} {/* BMI - Highlighted */} {t('health.tabs.healthProfile.basicInfoCard.bmi')} {healthData.bmi === '--' ? t('health.tabs.healthProfile.basicInfoCard.noData') : healthData.bmi} {/* Height - Clickable */} {healthData.height} {t('health.tabs.healthProfile.basicInfoCard.height')}/{t('health.tabs.healthProfile.basicInfoCard.heightUnit')} {/* Weight - Clickable */} {healthData.weight} {t('health.tabs.healthProfile.basicInfoCard.weight')}/{t('health.tabs.healthProfile.basicInfoCard.weightUnit')} {/* Waist - Clickable */} {healthData.waist} {t('health.tabs.healthProfile.basicInfoCard.waist')}/{t('health.tabs.healthProfile.basicInfoCard.waistUnit')} ); } const styles = StyleSheet.create({ card: { backgroundColor: '#FFFFFF', borderRadius: 20, padding: 20, marginBottom: 16, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.03, shadowRadius: 6, elevation: 1, }, cardTitle: { fontSize: 16, fontWeight: 'bold', color: '#1F2937', marginBottom: 16, fontFamily: 'AliBold', }, metricsGrid: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', }, metricItemMain: { flex: 1.5, backgroundColor: '#F5F3FF', borderRadius: 12, padding: 12, marginRight: 12, alignItems: 'center', }, metricHeader: { flexDirection: 'row', gap: 2, marginBottom: 8, }, metricLabelMain: { fontSize: 14, color: '#5B4CFF', fontWeight: 'bold', marginBottom: 4, fontFamily: 'AliBold', }, metricValueMain: { fontSize: 16, color: '#5B4CFF', fontFamily: 'AliRegular', }, metricItem: { flex: 1, alignItems: 'center', }, metricHeaderSmall: { flexDirection: 'row', alignItems: 'center', marginBottom: 8, gap: 2, }, metricLabel: { fontSize: 11, color: '#6B7280', marginBottom: 4, fontFamily: 'AliRegular', }, metricValue: { fontSize: 14, color: '#1F2937', fontWeight: '600', fontFamily: 'AliBold', }, });