import BoLBaseItemSheet from "./base-item-sheet.mjs"

/**
 * Item Sheet for "feature" type items (boons, careers, origins, etc.)
 * @extends {BoLBaseItemSheet}
 */
export default class BoLFeatureSheet extends BoLBaseItemSheet {
  
  /** @override */
  static DEFAULT_OPTIONS = {
    classes: ["bol", "sheet", "item", "item-type-feature"],
  }

  /** @override */
  static PARTS = {
    main: {
      template: "systems/bol/templates/item/feature-sheet.hbs",
    },
  }

  /** @override */
  async _prepareContext() {
    const context = await super._prepareContext()
    
    // Add feature-specific context
    context.isFeature = true
    context.isBoon = context.system.subtype === "boon"
    context.isFlaw = context.system.subtype === "flaw"
    context.isCareer = context.system.subtype === "career"
    context.isOrigin = context.system.subtype === "origin"
    context.isRace = context.system.subtype === "race"
    context.isFightOption = context.system.subtype === "fightoption"
    context.isEffect = context.system.subtype === "effect"
    context.isHoroscope = context.system.subtype === "horoscope"
    context.isXpLog = context.system.subtype === "xplog"
    
    return context
  }
}
