import React from 'react';
import { View, StyleSheet } from 'react-native';
import { Skeleton, SkeletonText } from '../ui/Skeleton';
import { useTheme } from '../../theme/ThemeContext';
/**
* Skeleton para tarjeta de balance de créditos
*/
export function CreditBalanceSkeleton() {
const { colors } = useTheme();
return (
);
}
/**
* Skeleton para transacción
*/
export function TransactionSkeleton() {
const { colors } = useTheme();
return (
);
}
/**
* Lista de skeletons de transacciones
*/
export function TransactionListSkeleton({ count = 5 }: { count?: number }) {
return (
{Array.from({ length: count }).map((_, index) => (
))}
);
}
/**
* Skeleton para paquete de créditos
*/
export function CreditPackageSkeleton() {
const { colors } = useTheme();
return (
);
}
/**
* Lista de skeletons de paquetes
*/
export function CreditPackageListSkeleton({ count = 4 }: { count?: number }) {
return (
{Array.from({ length: count }).map((_, index) => (
))}
);
}
const styles = StyleSheet.create({
balanceCard: {
borderRadius: 20,
padding: 24,
margin: 16,
},
balanceStats: {
flexDirection: 'row',
justifyContent: 'space-around',
marginTop: 20,
paddingTop: 16,
borderTopWidth: 1,
borderTopColor: 'rgba(255,255,255,0.2)',
},
balanceStat: {
alignItems: 'center',
},
transaction: {
flexDirection: 'row',
alignItems: 'center',
padding: 12,
borderBottomWidth: 1,
},
transactionIcon: {
marginRight: 12,
},
transactionContent: {
flex: 1,
},
package: {
flexDirection: 'row',
alignItems: 'center',
padding: 16,
borderRadius: 12,
marginBottom: 12,
},
packageContent: {
flex: 1,
marginLeft: 12,
},
packageList: {
padding: 16,
},
});