import { BaseItemDataModel } from "./base-item.mjs"

export default class SortilegeDataModel extends BaseItemDataModel {
  static defineSchema() {
    const fields = foundry.data.fields
    return {
      ...this.defineBaseSchema(),
      tradition: new fields.StringField({ initial: "" }),
      skillKey: new fields.StringField({ initial: "" }),
      polarity: new fields.StringField({ initial: "songes" }),
      cost: new fields.NumberField({ initial: 1, integer: true, min: 0 }),
      costFormula: new fields.StringField({ initial: "" }),
      variableCost: new fields.BooleanField({ initial: false }),
      preparation: new fields.StringField({ initial: "" }),
      duration: new fields.StringField({ initial: "" }),
      range: new fields.StringField({ initial: "" }),
      area: new fields.StringField({ initial: "" }),
      stacking: new fields.StringField({ initial: "" }),
      requiredDomains: new fields.ArrayField(new fields.StringField(), { initial: [] }),
      artsDomains: new fields.ArrayField(new fields.StringField(), { initial: [] }),
      effectsText: new fields.HTMLField({ initial: "" }),
      ruleTags: new fields.ArrayField(new fields.StringField(), { initial: [] }),
    }
  }
}
