{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.apps.smartmate.io/fields/types/phone/phone.props.schema.json",
  "$$target": "https://schemas.apps.smartmate.io/fields/types/phone/phone.props.schema.json",
  "title": "phone props",
  "allOf": [{"$ref": "https://schemas.apps.smartmate.io/fields/types/_base/_base.props.schema.json"}],
  "properties": {
    "type": {
      "$id": "#/properties/type",
      "type": "string",
      "enum": ["phone"]
    },
    "label": {},
    "description": {},
    "required": {},
    "readOnly": {},
    "hidden": {},
    "defaultValue": {
      "$id": "#/properties/defaultValue",
      "type": "object",
      "properties": {
        "countryCode": {
          "$id": "#/properties/defaultValue/properties/countryCode",
          "type": "string",
          "description": "Default Country Code. Should be entered using a 2 digit country code: https://www.iban.com/country-codes"
        },
        "number": {
          "$id": "#/properties/defaultValue/properties/number",
          "oneOf": [{"type": "string"}, {"type": "number"}],
          "description": "Default Number"
        },
        "extension": {
          "$id": "#/properties/defaultValue/properties/extension",
          "oneOf": [{"type": "string"}, {"type": "number"}],
          "description": "Default Extension"
        }
      },
      "additionalProperties": false
    },
    "display": {
      "$id": "#/properties/display",
      "type": "object",
      "title": "display",
      "description": "Whether to display or not these specific fields. If set to false, the corresponding input field won't be displayed.",
      "properties": {
        "countryCode": {
          "$id": "#/properties/display/properties/countryCode",
          "type": "boolean",
          "description": "Whether to display the country code dropdown"
        },
        "number": {
          "$id": "#/properties/display/properties/number",
          "type": "boolean",
          "description": "Whether to display the number input"
        },
        "extension": {
          "$id": "#/properties/display/properties/extension",
          "type": "boolean",
          "description": "Whether to display the extension input"
        }
      },
      "additionalProperties": false
    },
    "validations": {}
  },
  "additionalProperties": false
}
