import { SYSTEM } from "../config/system.mjs"
import { booleanField, htmlField, numberField } from "./shared.mjs"

export default class MGNEShield extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    return {
      description: htmlField(""),
      armorDie: new foundry.data.fields.StringField({
        required: true,
        nullable: false,
        initial: "d4",
        choices: SYSTEM.armorDieChoices,
      }),
      penalty: numberField(0, 0, 4),
      equipped: booleanField(false),
      broken: booleanField(false),
    }
  }

  /** @override */
  static LOCALIZATION_PREFIXES = ["MGNE.Shield"]
}
