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

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

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

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