import HamalronItemSheet from "./base-item-sheet.mjs" export default class HamalronLangueSheet extends HamalronItemSheet { /** @override */ static DEFAULT_OPTIONS = { classes: ["langue"], position: { width: 620, }, window: { contentClasses: ["langue-content"], }, } /** @override */ static PARTS = { tabs: { template: "templates/generic/tab-navigation.hbs", }, main: { template: "systems/fvtt-hamalron/templates/langue.hbs", }, } /** @override */ tabGroups = { sheet: "main", } /** * Prepare an array of form header tabs. * @returns {Record>} */ #getTabs() { const tabs = { main: { id: "main", group: "sheet", icon: "fa-solid fa-circle-info", label: "HAMALRON.Label.Details" }, } for (const v of Object.values(tabs)) { v.active = this.tabGroups[v.group] === v.id v.cssClass = v.active ? "active" : "" } return tabs } /** @override */ async _prepareContext() { const context = await super._prepareContext() context.tabs = this.#getTabs() context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true }) return context } }