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

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

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

  /** @override */
  async _prepareContext() {
    const context = await super._prepareContext()
    context.enrichedEffect = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.effect, { async: true })
    return context
  }
}
