import { SYSTEM } from "../config/system.mjs"

export default class FTLNomadImplant extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    const fields = foundry.data.fields
    const schema = {}
    const requiredInteger = { required: true, nullable: false, integer: true }

    schema.description = new fields.HTMLField({ required: true, textSearch: true })

    schema.techAge = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "lateatomic" })

    schema.enc = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
    schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 })
    schema.loss = new fields.NumberField({ required: true, initial: 0, min: 0 })

    return schema
  }

  /** @override */
  static LOCALIZATION_PREFIXES = ["FTLNOMAD.Implant"]

}
