import EcrymeBaseItemSheet from "./base-item-sheet.js"

export default class EcrymeEquipmentSheet extends EcrymeBaseItemSheet {
  /** @override */
  static DEFAULT_OPTIONS = {
    classes: ["equipment"],
    position: { width: 520 },
  }

  /** @override */
  static PARTS = {
    header:      { template: "systems/fvtt-ecryme/templates/items/partials/item-header.hbs" },
    tabs:        { template: "templates/generic/tab-navigation.hbs" },
    description: { template: "systems/fvtt-ecryme/templates/items/partials/item-description.hbs" },
    details:     { template: "systems/fvtt-ecryme/templates/items/item-equipment-details.hbs" },
  }

  /** @override */
  async _preparePartContext(partId, context) {
    context = await super._preparePartContext(partId, context)
    if (partId === "details") context.tab = context.tabs.details
    return context
  }
}
