// withHooks
// noPage
import esp from 'esoftplay/esp';

import { LibIcon } from 'esoftplay/cache/lib/icon/import';
import { LibStyle } from 'esoftplay/cache/lib/style/import';
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
import { MarketRating_input } from 'esoftplay/cache/market/rating_input/import';
import { MarketStyle } from 'esoftplay/cache/market/style/import';
import { UserClass } from 'esoftplay/cache/user/class/import';

import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';


export interface MarketRating_homeArgs {

}
export interface MarketRating_homeProps {

}
export default function m(props: MarketRating_homeProps): any {
  const user = UserClass.state().get()
  const imgW = LibStyle.width / 5

  return (
    <View style={[{ marginHorizontal: 15, backgroundColor: "white", padding: 15, borderRadius: 10, marginVertical: 10 }, LibStyle.elevation(2)]} >
      <TouchableOpacity onPress={() => { }} style={[{ alignItems: "center", justifyContent: "center", position: "absolute", top: 5, right: 5, backgroundColor: "white", width: 20, height: 20, borderRadius: 10 }, LibStyle.elevation(2)]} >
        <LibIcon name="close" color="#999" size={20} />
      </TouchableOpacity>
      <View style={{ flexDirection: "row", alignItems: "center" }} >
        <View style={{ flex: 1, marginRight: 5 }} >
          <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14 }} >{esp.lang("market/rating_home", "name", LibUtils.ucwords(user?.name))}</Text>
          <Text allowFontScaling={false} style={{ paddingTop: 5, fontFamily: "Arial", fontSize: 14 }} >{esp.lang("market/rating_home", "give_rating")}</Text>
          <MarketRating_input starSize={35} style={{ marginTop: 5 }} onChangeRating={() => { }} />
        </View>
        <View style={{ width: imgW, height: imgW, backgroundColor: MarketStyle.colorPrimaryMarket }} />
      </View>
    </View>

  )
}