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

import { LibIcon } from 'esoftplay/cache/lib/icon/import';
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
import { MarketStyle } from 'esoftplay/cache/market/style/import';

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


export interface MarketAds_keyword_itemArgs {

}
export interface MarketAds_keyword_itemProps {
  id: string,
  keyword: string,
  hits: string,
  used: string,
  used_active: string,
  competition: string,
  selected: boolean,
  onPress: () => void
}
export default function m(props: MarketAds_keyword_itemProps): any {
  return (
    <TouchableOpacity onPress={() => props.onPress()} style={styleId_22Wpss}>
      <Text allowFontScaling={false} style={styleId_Z5PFsW} >{props?.keyword}</Text>
      <Text allowFontScaling={false} style={styleId_Z5PFsW} >{esp.lang("market/ads_keyword_item", "hits", LibUtils.number(props?.hits))}</Text>
      <View style={styleId_ZYtonm}>
        <Text allowFontScaling={false} style={styleId_Z254biz} >{props?.competition}</Text>
      </View>
      <TouchableOpacity onPress={() => props.onPress()} style={styleId_Z17Mb5n}>
        <LibIcon name={props.selected ? "checkbox-marked" : "checkbox-blank-outline"} color={MarketStyle.colorPrimaryMarket} />
      </TouchableOpacity>
    </TouchableOpacity>
  )
}
const styleId_22Wpss: any = { marginTop: 0, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', margin: 15, paddingVertical: 10, borderBottomWidth: 1, borderBottomColor: '#c1c1c1' }
const styleId_Z5PFsW: any = { textAlign: 'left', flex: 2, fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0 }
const styleId_ZYtonm: any = { flex: 1, backgroundColor: 'skyblue', justifyContent: 'center', alignContent: 'center', alignItems: 'center', borderRadius: 5 }
const styleId_Z254biz: any = { fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: '#fff' }
const styleId_Z17Mb5n: any = { flex: 1, justifyContent: 'center', alignContent: 'flex-end', alignItems: 'flex-end' }