import React from 'react'; import { View } from 'react-native'; import { useTheme } from '~/features/theme/ThemeProvider'; import colors from '~/tailwind.config.js'; interface PeriodStatsCardSkeletonProps { marginBottom?: number; showTitle?: boolean; } /** * Skeleton loader for PeriodStatsCard component * Matches exact structure: Title (outside card) + Card with StatRows */ const PeriodStatsCardSkeleton: React.FC = ({ marginBottom = 12, showTitle = true }) => { const { isDark, themeVariant } = useTheme(); const contentBackgroundColor = isDark ? (colors as any).theme?.extend?.colors?.dark?.[themeVariant]?.contentBackground : (colors as any).theme?.extend?.colors?.[themeVariant]?.contentBackground; const borderColor = isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'; const skeletonColor = isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'; return ( <> {/* Title skeleton - matches PeriodStatsCard title styling */} {showTitle && ( )} {/* Card skeleton - matches exact PeriodStatsCard structure */} {/* StatRow skeletons - matches exact StatRow structure */} {[0, 1, 2, 3].map((index) => ( {/* Icon skeleton */} {/* Content area - matches StatRow flex: 1, marginLeft: 12 */} {/* Value skeleton - matches StatRow value styling */} ))} ); }; export default PeriodStatsCardSkeleton;