// RN-Port von apps/rebreak/app/components/sos/GameRatingStars.vue
import { View, Text } from 'react-native';
import { StarRating } from './StarRating';

export interface GameRatingStarsProps {
  avg: number;
  count: number;
}

export function GameRatingStars({ avg, count }: GameRatingStarsProps) {
  return (
    <View
      style={{
        flexDirection: 'row',
        alignItems: 'center',
        justifyContent: 'center',
        gap: 4,
      }}
    >
      <StarRating value={avg} size="xs" />
      {count > 0 ? (
        <Text
          style={{
            fontFamily: 'Nunito_400Regular',
            fontSize: 11,
            color: '#737373',
          }}
        >
          ({count})
        </Text>
      ) : null}
    </View>
  );
}
