import AwEItemSheet from "./base-item-sheet.mjs"
import { SYSTEM } from "../../config/system.mjs"

export default class AwESpecializationSheet extends AwEItemSheet {
  /** @override */
  static DEFAULT_OPTIONS = {
    classes: ["specialization"],
    position: { width: 620 },
    window: { contentClasses: ["specialization-content"] }
  }

  /** @override */
  static PARTS = {
    main: {
      template: "systems/fvtt-adventures-with-emmy/templates/specialization.hbs"
    }
  }

  /** @override */
  async _prepareContext(options) {
    const context = await super._prepareContext(options)
    context.attributeChoices = {
      "": "—",
      ...Object.fromEntries(Object.values(SYSTEM.ATTRIBUTES).map(a => [a.id, game.i18n.localize(a.label)]))
    }
    return context
  }
}
