{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://klarfort.com/tools/cagr-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"
    },
    "mode": {
      "type": "string",
      "title": "Calculation mode",
      "description": "Calculation mode",
      "enum": [
        "calculate",
        "future-value",
        "present-value",
        "years"
      ],
      "default": "calculate"
    },
    "startValue": {
      "type": "number",
      "title": "Starting value",
      "description": "Starting value",
      "default": 10000,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "endValue": {
      "type": "number",
      "title": "Ending value",
      "description": "Ending value",
      "default": 20000,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "years": {
      "type": "number",
      "title": "Years",
      "description": "Years",
      "default": 10,
      "minimum": 0.000001,
      "maximum": 100
    },
    "annualReturn": {
      "type": "number",
      "title": "Annual growth rate (%)",
      "description": "Annual growth rate (%)",
      "default": 7,
      "minimum": -99,
      "maximum": 100
    }
  },
  "required": [
    "currency",
    "mode",
    "startValue",
    "endValue",
    "years",
    "annualReturn"
  ]
}