export default {
  "metadata": { "section": "Image" },
  "definitions": {
    "ImageNode": {
      "metadata": {
        "tsRicosNode": true,
        "examples": ["image-id", "image-url"],
        "features": ["IMAGE"],
        "description": "Standalone images in a page."
      },
      "properties": {
        "type": {
          "enum": ["IMAGE"],
          "metadata": {
            "description": "Node type. \n Must be `IMAGE`."
          }
        },
        "imageData": {
          "ref": "ImageData",
          "metadata": {
            "description": "Image options."
          }
        }
      },
      "optionalProperties": {
        "id": {
          "type": "string",
          "metadata": {
            "format": "NODE_ID",
            "description": "[Node ID](#node-ids)."
          }
        },
        "nodes": {
          "metadata": {
            "tsRicosNodesChildren": true,
            "description": "Child nodes to define an image caption."
          },
          "elements": {
            "ref": "CaptionNode"
          }
        }
      }
    },
    "ImageData": {
      "properties": {
        "image": {
          "ref": "Media",
          "metadata": { "description": "Image file details." }
        }
      },
      "optionalProperties": {
        "containerData": {
          "ref": "PluginContainerData",
          "metadata": {
            "description": "Image container styling."
          }
        },
        "link": {
          "ref": "Link",
          "metadata": {
            "description": "Image link details."
          }
        },
        "disableExpand": {
          "type": "boolean",
          "metadata": {
            "description": "Whether the image expands to the full screen when clicked. \n Default: `false`"
          }
        },
        "altText": {
          "type": "string",
          "metadata": {
            "description": "Alternate text for accessibility and display when the image doesn't load."
          }
        },
        "caption": {
          "type": "string",
          "metadata": {
            "description": "Deprecated. Use `CaptionNode` instead.",
            "deprecated": true
          }
        },
        "disableDownload": {
          "type": "boolean",
          "metadata": {
            "description": "Whether the download image button is disabled. \n Default: `false`"
          }
        },
        "decorative": {
          "type": "boolean",
          "metadata": {
            "description": "Whether the image is decorative and does not need an explanation. Defaults to `false`."
          }
        },
        "styles": {
          "ref": "ImageData_Styles",
          "metadata": {
            "description": "Image styling."
          }
        }
      }
    },
    "ImageData_Styles": {
      "optionalProperties": {
        "border": {
          "ref": "ImageData_Styles_Border",
          "metadata": {
            "description": "Border properties."
          }
        }
      }
    },
    "ImageData_Styles_Border": {
      "optionalProperties": {
        "width": {
          "type": "int32",
          "metadata": {
            "description": "Border width in pixels."
          }
        },
        "color": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Border color as a hexadecimal value."
          }
        },
        "radius": {
          "type": "int32",
          "metadata": {
            "description": "Border radius in pixels."
          }
        }
      }
    }
  }
}