import WastelandActorSheet from "./base-actor-sheet.mjs"

export default class WastelandCreatureSheet extends WastelandActorSheet {
  /** @override */
  static DEFAULT_OPTIONS = {
    ...super.DEFAULT_OPTIONS,
    classes: [...super.DEFAULT_OPTIONS.classes, "creature"],
    window: {
      ...super.DEFAULT_OPTIONS.window,
      title: "Feuille de Créature",
    },
  }

  /** @override */
  static PARTS = {
    sheet: {
      template: "systems/fvtt-wasteland/templates/actor-creature-sheet.hbs",
    },
  }

  /** @override */
  tabGroups = {
    primary: "stats",
  }

  /** @override */
  async _prepareContext() {
    const context = await super._prepareContext()
    const actor = this.document

    // Add creature-specific data
    context.skills = actor.getSkills()
    context.armes = foundry.utils.duplicate(actor.getWeapons())
    context.protections = foundry.utils.duplicate(actor.getArmors())
    context.capacites = foundry.utils.duplicate(actor.getCapacites())
    context.combat = actor.getCombatValues()

    return context
  }
}
