class Area {
  slug = '';

  monsterProgress = 0;
  trainerProgress = 0;
  isCompleted = false;

  constructor (slug) {
    this.slug = slug;
  }

  async initialize () {}

  get name () {
    return translate(this.alternateSlug) || slugToName(this.slug);
  }

  get alternateSlug () {
    return DB.areas[this.slug]['modules/tuxemon.slug'];
  }

  get encounters () {
    return DB.areas[this.slug].encounters;
  }

  get requiredEncounters () {
    return DB.areas[this.slug].requiredEncounters;
  }

  get trainers () {
    return DB.areas[this.slug].trainers;
  }

  get environment () {
    return DB.areas[this.slug].environment;
  }

  get map () {
    return DB.areas[this.slug].map;
  }

  /**
   * @returns {Object[]}
   */
  get locations () {
    return DB.areas[this.slug].locations;
  }

  get events () {
    return DB.areas[this.slug].events;
  }

  get connections () {
    return DB.areas[this.slug].connections;
  }
}