import MGNEActorSheet from "./base-actor-sheet.mjs"
import { SYSTEM } from "../../config/system.mjs"

export default class MGNECompanionSheet extends MGNEActorSheet {
  static DEFAULT_OPTIONS = {
    classes: ["companion"],
    position: {
      width: 820,
      height: 700,
    },
  }

  static PARTS = {
    main: { template: "systems/fvtt-machine-gods-noxian-expanse/templates/companion-main.hbs" },
  }

  async _prepareContext() {
    const context = await super._prepareContext()
    context.abilityList = SYSTEM.abilityOrder.map(id => ({
      id,
      ...SYSTEM.abilities[id],
      value: context.source.system.abilities?.[id]?.value ?? 0,
    }))
    return context
  }
}
