// withHooks
// noPage

import { LibIcon } from 'esoftplay/cache/lib/icon/import';

import React from 'react';
import { View } from 'react-native';


export interface MarketRating_starArgs {

}
export interface MarketRating_starProps {
  review: string
  size?: number,
  containerStyle?: any,
  starStyle?: any
}
export default function m(props: MarketRating_starProps): any {

  const ar = [0, 0, 0, 0, 0]
  const def = parseInt(props.review) || ''
  for (let index = 0; index < def; index++) {
    ar.splice(index, 1, 1)
  }

  return (
    <View style={{ flexDirection: "row", marginVertical: 5, ...props.containerStyle }} >
      {
        ar.map((val: any, i: number) => (
          <LibIcon key={i} name={val == 1 ? 'star' : 'star-outline'} size={props.size || 14} color="gold" style={{ marginRight: 1, ...props.starStyle }} />
        ))
      }
    </View>
  )
}