const ADJECTIVES = [
  'cozy',
  'spicy',
  'mellow',
  'wandering',
  'toasty',
  'fizzy',
  'sunny',
  'breezy',
  'dreamy',
  'zesty',
  'crispy',
  'velvet',
  'sleepy',
  'jolly',
  'sandy',
  'misty',
  'rosy',
  'minty',
  'golden',
  'humble',
  'snug',
  'plucky',
  'salty',
  'sugary',
  'mossy',
  'lucky',
  'wobbly',
  'peppy',
  'frosty',
  'nutty',
]

const NOUNS = [
  'bagel',
  'mango',
  'matcha',
  'acorn',
  'pickle',
  'waffle',
  'noodle',
  'pretzel',
  'biscuit',
  'dumpling',
  'pebble',
  'lantern',
  'meadow',
  'harbor',
  'cove',
  'maple',
  'clover',
  'pumpkin',
  'truffle',
  'cricket',
  'otter',
  'sparrow',
  'cactus',
  'pesto',
  'gumbo',
  'scone',
  'walnut',
  'cobble',
  'thicket',
  'lagoon',
]

const pick = <T>(list: T[]): T =>
  list[Math.floor(Math.random() * list.length)]!

export const generateHandle = (): string =>
  `${pick(ADJECTIVES)}-${pick(NOUNS)}`
