// SPDX-FileCopyrightText: 2021 Johannes Loher
//
// SPDX-License-Identifier: MIT

import { DS4ActorSheet } from "./base-sheet";

/**
 * The Sheet class for DS4 Character Actors
 */
export class DS4CharacterActorSheet extends DS4ActorSheet {
  static get defaultOptions() {
    return foundry.utils.mergeObject(super.defaultOptions, {
      classes: ["sheet", "ds4-actor-sheet", "ds4-character-sheet"],
    });
  }

  /** @override */
  async getData(options = {}) {
    const context = await super.getData(options);
    context.data.system.profile.biography = await TextEditor.enrichHTML(context.data.system.profile.biography, {
      async: true,
    });
    return context;
  }
}
