import React from 'react'; import { View, Text, StyleSheet, ScrollView } from 'react-native'; import { useTheme } from '~/features/theme/ThemeProvider'; import { useTranslation } from 'react-i18next'; import GlassCard from './GlassCard'; import StatRow from './StatRow'; interface ProductivityCardProps { todayStats: { memos: number; memories: number; duration: number; words: number; }; last30DaysStats: { memos: number; memories: number; duration: number; words: number; }; currentStreak: number; longestStreak: number; activestWeek: { week: string; count: number }; activestMonth: { month: string; count: number }; } const ProductivityCard: React.FC = ({ todayStats, last30DaysStats, currentStreak, longestStreak, activestWeek, activestMonth, }) => { const { isDark } = useTheme(); const { t } = useTranslation(); const textColor = isDark ? '#FFFFFF' : '#000000'; const sectionTitleColor = isDark ? '#CCCCCC' : '#666666'; const formatDuration = (seconds: number): string => { const hours = Math.floor(seconds / 3600); const minutes = Math.floor((seconds % 3600) / 60); if (hours > 0) { return `${hours}h ${minutes}m`; } else if (minutes > 0) { return `${minutes}m`; } else { return `${seconds}s`; } }; return ( Produktivität {/* Today Section */} {t('statistics.period_today')} {/* Last 30 Days Section */} {t('statistics.period_last_30_days')} {/* Streaks & Activity */} {t('statistics.section_activity')} ); }; const styles = StyleSheet.create({ title: { fontSize: 26, fontWeight: '700', marginBottom: 20, }, sectionTitle: { fontSize: 15, fontWeight: '600', marginBottom: 10, marginTop: 4, textTransform: 'uppercase', letterSpacing: 0.5, }, statsContainer: { gap: 6, }, divider: { height: 0, marginVertical: 18, }, }); export default ProductivityCard;