import { SYSTEM } from "../config/system.mjs"
export default class LethalFantasyMiracle extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    const fields = foundry.data.fields
    const requiredInteger = { required: true, nullable: false, integer: true }
    const schema = {}

    schema.description = new fields.HTMLField({
      required: false,
      blank: true,
      initial: "",
      textSearch: true,
    })
    schema.level = new fields.NumberField({
      ...requiredInteger,
      initial: 1,
      min: 1,
      max: 20,
    })
    schema.components = new fields.SchemaField({
      verbal: new fields.BooleanField(),
      somatic: new fields.BooleanField(),
      material: new fields.BooleanField(),
      catalyst: new fields.BooleanField(),
      religious: new fields.BooleanField()
    })
    schema.prayerTime = new fields.StringField({ required: true, initial: "" })
    schema.miracleRange = new fields.StringField({ required: true, initial: "" })
    schema.areaAffected = new fields.StringField({ required: true, initial: "" })
    schema.duration = new fields.StringField({ required: true, initial: "" })
    schema.savingThrow = new fields.StringField({ required: true, initial: "" })
  
    return schema
  }

  /** @override */
  static LOCALIZATION_PREFIXES = ["LETHALFANTASY.Miracle"]
}
