{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://klarfort.com/tools/savings-goal-calculator/schema.json",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "currency": {
      "type": "string",
      "title": "Currency",
      "description": "Currency",
      "enum": [
        "USD",
        "EUR",
        "GBP",
        "JPY",
        "CHF",
        "CAD",
        "AUD",
        "CNY",
        "INR",
        "MXN",
        "BRL",
        "SGD",
        "HKD",
        "SEK",
        "NOK",
        "DKK",
        "NZD",
        "ZAR",
        "KRW",
        "TRY",
        "PLN",
        "CZK",
        "HUF",
        "AED",
        "THB",
        "IDR",
        "MYR",
        "PHP"
      ],
      "default": "USD"
    },
    "principal": {
      "type": "number",
      "title": "Starting balance",
      "description": "Starting balance",
      "default": 10000,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "months": {
      "type": "integer",
      "title": "Projection months",
      "description": "Projection months",
      "default": 12,
      "minimum": 1,
      "maximum": 600
    },
    "monthlyContribution": {
      "type": "number",
      "title": "Monthly contribution",
      "description": "Monthly contribution",
      "default": 0,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "annualReturn": {
      "type": "number",
      "title": "Annual return (%)",
      "description": "Annual return (%)",
      "default": 0,
      "minimum": -99,
      "maximum": 100
    },
    "mode": {
      "type": "string",
      "title": "Goal mode",
      "description": "Goal mode",
      "enum": [
        "required-monthly",
        "months-to-goal",
        "budget"
      ],
      "default": "required-monthly"
    },
    "goal": {
      "type": "number",
      "title": "Savings goal",
      "description": "Savings goal",
      "default": 50000,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "monthlyIncome": {
      "type": "number",
      "title": "Monthly take-home income",
      "description": "Monthly take-home income",
      "default": 5000,
      "minimum": 0,
      "maximum": 1000000000000
    }
  },
  "required": [
    "currency",
    "principal",
    "months",
    "monthlyContribution",
    "annualReturn",
    "mode",
    "goal",
    "monthlyIncome"
  ]
}