import DaggerheartSheet from '../daggerheart-sheet.mjs'; const { ItemSheetV2 } = foundry.applications.sheets; export default class ArmorSheet extends DaggerheartSheet(ItemSheetV2) { static DEFAULT_OPTIONS = { tag: 'form', classes: ['daggerheart', 'sheet', 'item', 'dh-style', 'armor'], position: { width: 600 }, form: { handler: this.updateForm, submitOnChange: true, closeOnSubmit: false }, dragDrop: [{ dragSelector: null, dropSelector: null }] }; static PARTS = { header: { template: 'systems/daggerheart/templates/sheets/items/armor/header.hbs' }, tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' }, description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' }, settings: { template: 'systems/daggerheart/templates/sheets/items/armor/settings.hbs', scrollable: ['.settings'] } }; static TABS = { description: { active: true, cssClass: '', group: 'primary', id: 'description', icon: null, label: 'DAGGERHEART.Sheets.Feature.Tabs.Description' }, settings: { active: false, cssClass: '', group: 'primary', id: 'settings', icon: null, label: 'DAGGERHEART.Sheets.Feature.Tabs.Settings' } }; async _prepareContext(_options) { const context = await super._prepareContext(_options); context.document = this.document; context.config = CONFIG.daggerheart; context.tabs = super._getTabs(this.constructor.TABS); return context; } static async updateForm(event, _, formData) { await this.document.update(formData.object); this.render(); } }