{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.apps.smartmate.io/fields/types/address/address.props.schema.json",
  "$$target": "https://schemas.apps.smartmate.io/fields/types/address/address.props.schema.json",
  "title": "address props",
  "allOf": [{"$ref": "https://schemas.apps.smartmate.io/fields/types/_base/_base.props.schema.json"}],
  "properties": {
    "type": {
      "$id": "#/properties/type",
      "type": "string",
      "enum": ["address"],
      "description": "it must be address"
    },
    "label": {},
    "description": {},
    "required": {},
    "readOnly": {},
    "hidden": {},
    "defaultValue": {
      "$id": "#/properties/defaultValue",
      "type": "object",
      "properties": {
        "country": {
          "description": "Use a 2 letter country code: https://www.iban.com/country-codes",
          "$id": "#/properties/defaultValue/properties/country",
          "type": "string"
        },
        "state": {
          "$id": "#/properties/defaultValue/properties/state",
          "type": "string"
        },
        "city": {
          "$id": "#/properties/defaultValue/properties/city",
          "type": "string"
        },
        "address1": {
          "$id": "#/properties/defaultValue/properties/address1",
          "type": "string"
        },
        "address2": {
          "$id": "#/properties/defaultValue/properties/address2",
          "type": "string"
        },
        "zipCode": {
          "$id": "#/properties/defaultValue/properties/zipCode",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "display": {
      "$id": "#/properties/display",
      "type": "object",
      "description": "Whether to display or not these specific fields. If set to false, the corresponding input field won't be displayed.",
      "properties": {
        "country": {
          "$id": "#/properties/display/properties/country",
          "type": "boolean"
        },
        "state": {
          "$id": "#/properties/display/properties/state",
          "type": "boolean"
        },
        "city": {
          "$id": "#/properties/display/properties/city",
          "type": "boolean"
        },
        "address1": {
          "$id": "#/properties/display/properties/address1",
          "type": "boolean"
        },
        "address2": {
          "$id": "#/properties/display/properties/address2",
          "type": "boolean"
        },
        "zipCode": {
          "$id": "#/properties/display/properties/zipCode",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "validations": {}
  },
  "additionalProperties": false
}
