import WastelandItemSheet from "./base-item-sheet.mjs"

export default class WastelandDonSheet extends WastelandItemSheet {
  static DEFAULT_OPTIONS = {
    classes: ["don"],
    position: { width: 620 },
    window: { contentClasses: ["don-content"] },
  }

  static PARTS = {
    main: { template: "systems/fvtt-wasteland/templates/item-don-sheet.hbs" },
  }

  tabGroups = { primary: "description" }

  #getTabs() {
    const tabs = {
      description: { id: "description", group: "primary", label: "Description" }
    }
    for (const v of Object.values(tabs)) {
      v.active = this.tabGroups[v.group] === v.id
      v.cssClass = v.active ? "active" : ""
    }
    return tabs
  }

  async _prepareContext() {
    const context = await super._prepareContext()
    context.tabs = this.#getTabs()
    return context
  }
}
