import { Colors } from '../../../../theme';
import { StyleSheet } from 'react-native';
import { getFontSize } from '../../../../utils';

export const ProfileStyles = StyleSheet.create({
  wrapper: {
    backgroundColor: Colors.FILL_LIGHT,
    borderRadius: 12,
    marginBottom: 12,
    flexDirection: 'row'
  },
  badge: {
    width: 36,
    height: 14,
    borderRadius: 7,
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center'
  },
  badgesWrapper: {
    display: 'flex',
    flexDirection: 'row',
    gap: 3,
    marginLeft: 10
  },
  profileRoot: {
    alignItems: 'center',
    flexDirection: 'row',
    gap: 10,
  },
  index: {
    backgroundColor: '#E7E7E7',
    borderTopLeftRadius: 12,
    borderBottomLeftRadius: 12,
    alignItems: 'center',
    justifyContent: 'center'
  },
  avatarContainer: {
    backgroundColor: '#E7E7E7',
    height: '100%',
    paddingTop: 3,
    paddingBottom: 4,
    alignItems: 'center',
    maxHeight: 70,
    justifyContent: 'center'
  },
  profileAvatar: {
    borderRadius: 24,
    width: 48,
    height: 48,
    borderWidth: 2,
    borderColor: Colors.FILL_LIGHT,
  },
  profileFirstLastName: {
    flex: 1,
    fontFamily: 'redhat-700',
    color: Colors.DARK_BLUE,
    fontSize: getFontSize(12)
  },
  profileDataRoot: {
    gap: 5,
    paddingBottom: 4,
    flex: 1,
    paddingTop: 3
  },
  profileDataContainer: {
    display: 'flex',
    justifyContent: 'space-between',
    flexDirection: 'row'
  },
  profileDataWrapper: {
    display: 'flex',
    flexDirection: 'row',
    gap: 10,
    alignItems: 'center'
  },
  profileAge: {
    color: Colors.DARK_BLUE,
    fontWeight: '600',
    fontSize: getFontSize(12)
  },
  countryFlag: {
    width: 20,
    height: 20,
    borderRadius: 20 / 2,
    borderWidth: 0.5,
    borderColor: 'gray'
  },
  profileContainer: {
    justifyContent: 'space-between',
    flexDirection: 'row',
    alignItems: 'center',
    marginBottom: 16
  },
  rightScore: { flexDirection: 'row', alignItems: 'center', gap: 4 }
});

export const ScoreStyles = StyleSheet.create({
  scoreWrapper: {
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
    flexDirection: 'column',
    flexBasis: '18%',
    marginBottom: 10,
    width: 40
  },
  scoreHeaderText: {
    fontFamily: 'montserrat-700',
    color: Colors.DARK_BLUE,
    fontSize: getFontSize(12),
    textAlign: 'center'
  },
  scoreNameText: {
    color: Colors.DARK_BLUE,
    fontWeight: '600',
    fontSize: getFontSize(11),
    textAlign: 'center'
  },
  rankText: {
    fontSize: 18,
    color: Colors.DARK_BLUE,
    fontWeight: '700',
  },
  nmWrapper: {
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
  },
  rankingWrapper: {
    display: 'flex',
    flexDirection: 'row',
    justifyContent: 'center',
    alignItems: 'center',
    flex: 1,
  },
  rankingScoresWrapper: {
    display: 'flex',
    flexDirection: 'row',
    justifyContent: 'center',
    alignItems: 'center',
    flexWrap: 'wrap',
    flex: 1
  },
  score: {
    backgroundColor: '#E7E7E7',
    width: 48,
    alignItems: 'center',
    justifyContent: 'flex-start',
    flex: 1,
    alignSelf: 'flex-start'
  },
  activeScoreRanking: {
    fontSize: 16,
    color: Colors.DARK_BLUE,
    fontWeight: '700',
    fontFamily: 'montserrat-700',
  },
  activeScoreName: {
    fontSize: 12,
    color: Colors.DARK_BLUE,
    fontWeight: '600'
  }
});

export const TBTStyles = StyleSheet.create({
  badgeRoot: {
    display: 'flex',
    marginTop: 10,
    flex: 1
  },
  badgeWrapper: {
    display: 'flex',
    alignItems: 'center',
  }
});

export const HorizontalSelectStyles = StyleSheet.create({
  wrapper: {
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
    paddingLeft: 10,
    paddingRight: 10,
    borderRadius: 17,
    height: 33
  },
  text: {
    fontSize: getFontSize(12),
    fontWeight: '600'
  },
  notActiveText: {
    color: Colors.DARK_BLUE
  },
  activeText: {
    color: Colors.WHITE
  },
  notSelected: {
    backgroundColor: Colors.WHITE,
    borderColor: 'rgba(15, 63, 79, 0.3)',
    borderWidth: 1
  },
  selected: {
    backgroundColor: Colors.ORANGE
  }
});

export const ModalStyles = StyleSheet.create({
  dropdown: {
    width: '47%',
    height: 40,
    backgroundColor: '#F4F4F4',
    borderRadius: 4,
    paddingHorizontal: 8
  },
  placeholderStyle: {
    fontSize: 16,
    color: Colors.DARK_BLUE
  },
  selectedTextStyle: {
    fontSize: 16,
    color: Colors.DARK_BLUE
  },
  ageAndRankingWrapper: {
    width: '100%',
    display: 'flex',
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
    marginTop: 15
  },
  buttonsWrapper: {
    width: '100%',
    display: 'flex',
    justifyContent: 'space-between',
    flexDirection: 'row',
    marginTop: 20
  },
  dropdownContent: {
    borderRadius: 4
  },
  search: {
    height: 40,
    borderRadius: 4,
  }
});

export const ItemStyles = StyleSheet.create({
  wrapper: {
    display: 'flex',
    alignItems: 'center',
    flexDirection: 'row',
    flex: 1,
    gap: 8,
    backgroundColor: Colors.FILL_LIGHT,
    padding: 6,
    borderRadius: 8
  },
  contentWrapper: {
    flex: 1,
    display: 'flex',
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
  },
  bigFlag: {
    width: 36,
    height: 36,
    borderRadius: 18,
    borderWidth: 1,
    borderColor: Colors.DARK_LIGHT
  },
  withFlagWrapper: {
    display: 'flex',
    flexDirection: 'row'
  },
  smallFlag: {
    width: 20,
    height: 20,
    borderRadius: 10,
    borderWidth: 1,
    borderColor: Colors.DARK_LIGHT
  },
  flagSquare: {
    width: 20,
    height: 20,
    resizeMode: 'contain'
  },
  headerContainer: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: 4,
    justifyContent: 'center',
    paddingBottom: 16,
    paddingTop: 8
  },
  nameAndCnt: {
    color: Colors.DARK_BLUE,
    fontWeight: '700',
  },
  headerWrapper: {
    fontSize: getFontSize(14),
    paddingBottom: 16,
    paddingTop: 8,
    textAlign: 'center'
  },
  headerSeriesWrapper: {
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
    flexDirection: 'row',
    gap: 10,
    marginTop: 10,
    marginBottom: 16
  },
  comment: {
    color: Colors.DARK_BLUE,
    textAlign: 'center',
    marginBottom: 8
  }
});

export const TriumphsStyles = StyleSheet.create({
  itemContainer: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: 8,
    backgroundColor: Colors.FILL_LIGHT,
    padding: 6,
    borderRadius: 8,
  },
  avatar: {
    width: 48,
    height: 48,
    borderRadius: 24,
    borderWidth: 1,
    borderColor: Colors.DARK_LIGHT
  },
  flag: {
    width: 20,
    height: 20,
    borderRadius: 10,
    borderWidth: 1,
    borderColor: Colors.DARK_LIGHT,
    position: 'absolute',
    top: 0,
    right: 0
  },
  text: {
    fontSize: 14,
    fontWeight: '600',
    color: Colors.ORANGE
  },
  reached: {
    color: Colors.DARK_BLUE,
    fontWeight: '400'
  },
  icon: {
    width: 24,
    height: 24
  },
  tresholdContainer: {
    alignItems: 'center',
    justifyContent: 'center',
    gap: 3
  },
  treshold: {
    fontSize: 14,
    fontWeight: '600',
    color: Colors.DARK_BLUE
  }
});
