import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../../common/_module.mjs";
import { ITEM_TYPES } from "../../constants.js";
import RdDItemBaseSheet from "./common-item-sheet.mjs";

export default class RdDConteneurSheet extends RdDItemBaseSheet {
  static get ITEM_TYPE() { return ITEM_TYPES.conteneur; }
  static get TEMPLATES() { return [TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE]; }

  static DEFAULT_OPTIONS = Object.assign({},
    RdDItemBaseSheet.DEFAULT_OPTIONS,
    {
      classes: ["fvtt-rdd", "item", "conteneur"],
      position: { width: 448 },
      window: { contentClasses: ["conteneur-content"] },
    });

  static PARTS = {
    main: {
      template: "systems/foundryvtt-reve-de-dragon/templates/sheets/item/conteneur.hbs",
    },
  };

  async _prepareContext() {
    return Object.assign(
      await super._prepareContext(),
      {
        actorId: this.document.parent?.id,
      }
    );
  }
}
