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

export default class OathHammerOathSheet extends OathHammerItemSheet {
  /** @override */
  static DEFAULT_OPTIONS = {
    classes: ["oath"],
    position: {
      width: 620,
    },
    window: {
      contentClasses: ["oath-content"],
    },
  }

  /** @override */
  static PARTS = {
    main: {
      template: "systems/fvtt-oath-hammer/templates/item/oath-sheet.hbs",
    },
  }

  /** @override */
  async _prepareContext() {
    const context = await super._prepareContext()
    context.enrichedTenet = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.tenet, { async: true })
    context.enrichedBoon = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.boon, { async: true })
    context.enrichedBane = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.bane, { async: true })
    return context
  }
}
