import PrismRPGItemSheet from "./base-item-sheet.mjs"
import { SYSTEM } from "../../config/system.mjs"

export default class PrismRPGSkillSheet extends PrismRPGItemSheet {
  /** @override */
  static DEFAULT_OPTIONS = {
    classes: ["skill"],
    position: {
      width: 600,
    },
    window: {
      contentClasses: ["skill-content"],
    },
  }

  /** @override */
  static PARTS = {
    main: {
      template: "systems/fvtt-prism-rpg/templates/skill.hbs",
    },
  }

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