const firstName = 'Sebin',
  middleName = 'Antario',
  lastName = 'Nyshkim',
  species = 'Anthro Dragon',
  dateOfBirth = new Date('1993-10-17'),
  gender = 'male',
  pronouns = 'he/him',
  orientation = 'gay',
  position = 'vers, prefers top',
  height = 210, // cm
  weight = 124, // kg
  tailLength = 104, // cm
  wingspan = 417, // cm
  colors = {
    hairPrimary: '#4b608f',
    hairSecondary: '#6684c0',
    eyes: '#31c215',
    scalesPrimary: '#c64c35',
    scalesSecondary: '#eda958',
    eyebrows: '#eda958',
    tailspikes: '#7f4539',
    horns: '#413a3a',
    claws: '#413a3a',
    nipples: '#413a3a',
    penis: '#413a3a'
  },
  hobbies = ['working out', 'travels', 'camping', 'video games', 'tech'],
  penis = {
    shape: 'humanoid',
    type: 'grower',
    special: 'ridged, no foreskin',
    size: 20, // cm
    girth: 5 // cm
  },
  description = 'Learn all about that derg!',
  attacks = [
    {
      id: 'attack-fire-breath',
      name: 'Fire Breath',
      description:
        'Like most fire dragons, Sebin can breathe fire. In order to do this, he takes a deep breath to enrich the oxygen in his lungs with gases, which, together with special glands in his mouth, produce a combustible mixture. The resulting jet of fire, reaching several hundred degrees Celsius, spreads out on its way to its target, scorching everything in its path.'
    },
    {
      id: 'attack-flame-toss',
      name: 'Flame Toss',
      description:
        'By spitting fire into his hands, Sebin can form it into a ball and use it as a projectile. His scales are fireproof and can withstand the high temperatures. Due to their high concentration, the projectiles explode upon impact. By combining two fireballs the explosion radius increases dramatically.'
    },
    {
      id: 'attack-kindled-fist',
      name: 'Kindled Fist',
      description:
        'Apart from throwing projectiles, Sebin can also use the fireballs to wrap his fists in fire. This allows him to inflict severe burns on his opponent with each blow. In addition, he can release the fire from his fists with aimed blows and hurl it at his opponents.'
    },
    {
      id: 'attack-burning-twister',
      name: 'Burning Twister',
      description:
        'A technique used in aerial combat, Sebin uses his fire breath to engulf his body in flames while spinning to become a fire tornado that singes opponents.'
    }
  ],
  overdriveAttacks = [
    {
      id: 'attack-fire-breath',
      name: 'Fire Breath (improved)',
      description:
        "The reach of Sebin's Fire Breath increases as well as the frequency at which he can fire shots from his mouth."
    },
    {
      id: 'attack-flame-toss',
      name: 'Flame Toss (improved)',
      description:
        'Overdrive Form eliminates the need for Sebin to spit fire into his palms. It instead enables him to fire the shots directly from the palm palm of his hands, as the firey veins crossing his arms act as an orifice to do so. The explosion radius of the burning projectiles that explode on impact is greatly increased.'
    },
    {
      id: 'attack-kindled-fist',
      name: 'Kindled Fist (improved)',
      description:
        'As his arms and legs are infused with fire his punches and kicks exert trails of flames while doing so. Landing a punch or kick sears enemies.'
    },
    {
      id: 'attack-burning-twister',
      name: 'Searing Discus',
      description:
        'Overdrive allows Sebin to form rings of fire by igniting flames from his fingertips and swirling them in a circle motion. He can use them for both close quarters or ranged combat.'
    },
    {
      id: 'attack-fire-breath',
      name: 'Combustion Flare',
      description:
        'Clinking both of his wrists against each other like flints unleashes a devestating fire blast from both of his fire-infused hands. A secure foothold is needed to prevent Sebin from being thrown back by the recoil of the attack. Using this technique in the air is therefore highly risky.'
    },
    {
      id: 'attack-flame-toss',
      name: 'Blazing Pandemonium',
      description:
        "A heavy impact into the ground from a great height with both fists, tearing deep cracks in the ground around the impact crater. Combined with Kindled Fist the heat in Sebin's arms are forced through the newly created furrows, transforming the scene into an inferno."
    },
    {
      id: 'attack-kindled-fist',
      name: 'Scorching Edge',
      description:
        'A fiery blade towering several meters into the air that Sebin sends careening towards his enemies from his fire-infused legs with a backflip kick, leaving a swath of destruction in its wake. Upon impact the force of the attack is distributed sideways.'
    },
    {
      id: 'attack-burning-twister',
      name: 'Circling Fire Shield',
      description:
        'A rather defensive technique. By spinning around with stretched out arms Sebin creates fire balls, which he usually hurls towards enemies, that circle around his body diagonally. They act as a shield while he can still move his arms relatively freely. Enemies would be well advised to keep their distance to this spinning shield, as the fire balls will still explode on contact.'
    }
  ];
// kinks = [
//   { name: 'Absorption', rating: Ratings.No },
//   { name: 'Anal', rating: Ratings.Love, role: Role.Both },
//   { name: 'Auto-Fellatio', rating: Ratings.Yes },
//   { name: 'Biting', rating: Ratings.Yes, role: Role.Both },
//   { name: 'Bukkake', rating: Ratings.Yes, role: Role.Give },
//   { name: 'Chastity', rating: Ratings.No },
//   { name: 'Chubby', rating: Ratings.Maybe },
//   { name: 'Clothed Sex', rating: Ratings.Yes },
//   { name: 'Cock Slapping', rating: Ratings.Yes, role: Role.Give },
//   { name: 'Coiling', rating: Ratings.Maybe, role: Role.Give },
//   { name: 'Competition', rating: Ratings.Maybe, role: Role.Give },
//   { name: 'Creampie', rating: Ratings.Yes, role: Role.Give },
//   { name: 'Crushing (Living/Objects)', rating: Ratings.No },
//   { name: 'Cum From Mouth/Nose', rating: Ratings.Yes, role: Role.Give },
//   { name: 'Cum Inflation (Light/Medium)', rating: Ratings.Yes },
//   { name: 'Deep-throat', rating: Ratings.Yes, role: Role.Receive },
//   { name: 'Dirty Talking', rating: Ratings.Yes },
//   { name: 'Excessive Cum', rating: Ratings.Love, role: Role.Both },
//   { name: 'Face-Fucking', rating: Ratings.Yes, role: Role.Give },
//   { name: 'Facial', rating: Ratings.Yes, role: Role.Give },
//   { name: 'Feet', rating: Ratings.No },
//   { name: 'Filled Condoms', rating: Ratings.Yes },
//   { name: 'Foreplay', rating: Ratings.Yes, role: Role.Both },
//   { name: 'Frotting', rating: Ratings.Yes },
//   { name: 'Gangbangs', rating: Ratings.Yes },
//   { name: 'Growth', rating: Ratings.Love, role: Role.Receive },
//   { name: 'Handjobs', rating: Ratings.Yes, role: Role.Both },
//   { name: 'Hotdogging', rating: Ratings.Yes, role: Role.Give },
//   { name: 'Kissing', rating: Ratings.Yes, role: Role.Both },
//   { name: 'Macro', rating: Ratings.Love },
//   { name: 'Milking', rating: Ratings.Yes },
//   { name: 'Muscle Growth', rating: Ratings.Love, role: Role.Both },
//   { name: 'Muscle Worship', rating: Ratings.Yes, role: Role.Both },
//   { name: 'Nipple Play', rating: Ratings.Yes, role: Role.Both },
//   { name: 'Oral', rating: Ratings.Love, role: Role.Both },
//   { name: 'Rough', rating: Ratings.Yes, role: Role.Both },
//   { name: 'Sheath Play', rating: Ratings.Yes, role: Role.Both },
//   { name: 'Size Difference', rating: Ratings.Love },
//   { name: 'Slime/Goo Characters', rating: Ratings.Yes },
//   { name: 'Spanking', rating: Ratings.Maybe, role: Role.Give },
//   { name: 'Tailsex', rating: Ratings.Yes, role: Role.Both },
//   { name: 'Toys', rating: Ratings.Yes, role: Role.Both },
//   { name: 'Underwear', rating: Ratings.Love },
//   { name: 'Unsanitary', rating: Ratings.No },
//   { name: 'Verbal Abuse', rating: Ratings.Maybe, role: Role.Give },
//   { name: 'Vore', rating: Ratings.No }
// ],

const getClientLocale = () => {
  return navigator.languages.length > 0 ? navigator.languages[0] : 'en-US';
};

const getAge = (dateOfBirth) => {
  const today = new Date();

  const thisYear = today.getFullYear();
  const thisMonth = today.getMonth();
  const thisDay = today.getDate();

  const dobYear = dateOfBirth.getFullYear();
  const dobMonth = dateOfBirth.getMonth();
  const dobDay = dateOfBirth.getDate();

  let age = thisYear - dobYear;

  if (thisMonth < dobMonth) age--;
  if (thisMonth === dobMonth && thisDay < dobDay) age--;

  return age;
};

const toImperial = (cm) => {
  const realFeet = (cm * 0.3937) / 12;
  const feet = Math.floor(realFeet);
  const inches = Math.round((realFeet - feet) * 12);

  return `${feet}'${inches}"`;
};

const toInch = (cm) => {
  return `${Math.round(cm / 2.45)} in`;
};

const toLbs = (kg) => {
  const nearExact = kg / 0.45359237;
  const lbs = Math.floor(nearExact);

  return lbs;
};

const toFahrenheit = (celsius) => {
  return celsius * 1.8 + 32;
};

const dateFormat = new Intl.DateTimeFormat(getClientLocale(), {
  year: 'numeric',
  month: 'long',
  day: '2-digit'
});

const getFullName = () => `${firstName} ${middleName} ${lastName}`;
const getDateOfBirth = () => `${dateFormat.format(dateOfBirth)} (${getAge(dateOfBirth)})`;
const getHeight = () => `${height} cm (${toImperial(height)})`;
const getWeight = () => `${weight} kg (${toLbs(weight)} lbs)`;
const getTailLength = () => `${tailLength / 100} m (${toImperial(tailLength)})`;
const getWingspan = () => `${wingspan / 100} m (${toImperial(wingspan)})`;

const getTraits = () => [
  { icon: 'cake-candles', type: 'Date of Birth', text: getDateOfBirth() },
  { icon: 'mars', type: 'Sex/Gender', text: gender },
  { icon: 'ruler', type: 'Height', text: getHeight() },
  { icon: 'weight-hanging', type: 'Weight', text: getWeight() },
  { icon: 'ruler', type: 'Tail Length', text: getTailLength() },
  { icon: 'ruler', type: 'Wingspan', text: getWingspan() }
];

const getSexTraits = () => [
  { icon: 'heart', type: 'Orientation', text: orientation },
  { icon: 'arrows-up-down', type: 'Position', text: position }
];

const getColors = () => [
  { name: 'Scales', value: colors.scalesPrimary },
  { name: 'Chest, Membranes, Facial Spikes', value: colors.scalesSecondary },
  { name: 'Hair', value: colors.hairPrimary },
  { name: 'Eyes', value: colors.eyes },
  { name: 'Horns, Claws, Nipples', value: colors.horns },
  { name: 'Tail Spikes', value: colors.tailspikes }
];

export default {
  firstName,
  species,
  gender,
  pronouns,
  orientation,
  position,
  description,
  attacks,
  overdriveAttacks,
  getFullName,
  getTraits,
  getSexTraits,
  getColors
};
