module.exports = {
  "metadata": { "section": "Link Preview" },
  "definitions": {
    "LinkPreviewNode": {
      "metadata": {
        "tsRicosNode": true,
        "examples": ["link-preview"],
        "features": ["LINK_PREVIEW"],
        "description": "Preview or summary of a webpage. Link previews include elements such as the title of the linked page, a brief description or excerpt of the content, and sometimes a thumbnail image or other relevant information."
      },
      "properties": {
        "type": {
          "enum": ["LINK_PREVIEW"],
          "metadata": {
            "description": "Node type. \n Must be `LINK_PREVIEW`."
          }
        },
        "linkPreviewData": {
          "ref": "LinkPreviewData",
          "metadata": {
            "description": "Link preview details."
          }
        }
      },
      "optionalProperties": {
        "id": {
          "type": "string",
          "metadata": {
            "format": "NODE_ID",
            "description": "[Node ID](#node-ids)."
          }
        },
        "nodes": {
          "metadata": { "internal": true, "tsRicosNodesChildren": true },
          "elements": { "ref": "Never" }
        }
      }
    },
    "LinkPreviewData": {
      "optionalProperties": {
        "containerData": {
          "ref": "PluginContainerData",
          "metadata": {
            "description": "Link preview container styling."
          }
        },
        "link": {
          "ref": "Link",
          "metadata": { "description": "Link details." }
        },
        "title": {
          "type": "string",
          "metadata": { "description": "Preview title." }
        },
        "thumbnailUrl": {
          "type": "string",
          "metadata": { "description": "Preview thumbnail URL." }
        },
        "description": {
          "type": "string",
          "metadata": { "description": "Preview description." }
        },
        "html": {
          "type": "string",
          "metadata": { "description": "Preview content as HTML." }
        },
        "styles": {
          "ref": "LinkPreviewData_Styles",
          "metadata": {
            "description": "Styling for the link preview."
          }
        }
      }
    },
    "LinkPreviewData_Styles": {
      "optionalProperties": {
        "backgroundColor": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Background color as a hexadecimal value."
          }
        },
        "titleColor": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Title color as a hexadecimal value."
          }
        },
        "subtitleColor": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Subtitle color as a hexadecimal value."
          }
        },
        "linkColor": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Link color as a hexadecimal value."
          }
        },
        "borderWidth": {
          "type": "int32",
          "metadata": {
            "description": "Border width in pixels."
          }
        },
        "borderRadius": {
          "type": "int32",
          "metadata": {
            "description": "Border radius in pixels."
          }
        },
        "borderColor": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Border color as a hexadecimal value."
          }
        },
        "thumbnailPosition": {
          "enum": [
            "START",
            "END",
            "TOP",
            "HIDDEN"
          ],
          "metadata": {
            "description": "Position of thumbnail. Defaults to `START`."
          }
        }
      }
    }
  }
}