module.exports = {
  "metadata": {
    "section": "Table"
  },
  "definitions": {
    "TableCellNode": {
      "metadata": {
        "tsRicosNode": true
      },
      "properties": {
        "type": {
          "enum": [
            "TABLE_CELL"
          ],
          "metadata": {
            "description": "Node type. \n Must be `TABLE_CELL`."
          }
        },
        "nodes": {
          "elements": {
            "ref": "TableCellChildNode"
          },
          "metadata": {
            "tsRicosNodesChildren": true,
            "description": "Child nodes to define cell content.",
            "validation": {
              "minSize": 1
            }
          }
        }
      },
      "optionalProperties": {
        "id": {
          "type": "string",
          "metadata": {
            "format": "NODE_ID",
            "description": "[Node ID](#node-ids)."
          }
        },
        "tableCellData": {
          "ref": "TableCellData",
          "metadata": {
            "description": "Table cell details."
          }
        }
      }
    },
    "TableCellChildNode": {
      "metadata": {
        "refUnion": [
          "ParagraphNode",
          "HeadingNode",
          "BulletedListNode",
          "OrderedListNode",
          "CheckboxListNode",
          "BlockquoteNode",
          "AudioNode",
          "FileNode",
          "ImageNode",
          "VideoNode",
          "GifNode",
          "DividerNode",
          "CodeBlockNode",
          "HtmlNode",
          "TocNode",
          "LinkPreviewNode",
          "AppEmbedNode",
          "ButtonNode",
          "EmbedNode",
          "ShapeNode"
        ],
        "description": "Table cell content node."
      }
    },
    "TableCellData": {
      "optionalProperties": {
        "cellStyle": {
          "metadata": {
            "description": "Cell styling."
          },
          "ref": "TableCellData_CellStyle"
        },
        "borderColors": {
          "metadata": {
            "description": "Cell border colors."
          },
          "ref": "TableCellData_BorderColors"
        },
        "borderWidths": {
          "metadata": {
            "description": "Cell border widths."
          },
          "ref": "TableCellData_BorderWidths"
        },
        "colspan": {
          "type": "int32",
          "metadata": {
            "description": "Defines how many columns the cell spans.",
            "validation": {
              "min": 0
            }
          }
        },
        "rowspan": {
          "type": "int32",
          "metadata": {
            "description": "Defines how many rows the cell spans.",
            "validation": {
              "min": 0
            }
          }
        }
      }
    },
    "TableCellData_CellStyle": {
      "optionalProperties": {
        "verticalAlignment": {
          "metadata": {
            "description": "Vertical alignment for the cell's text."
          },
          "enum": [
            "TOP",
            "MIDDLE",
            "BOTTOM"
          ]
        },
        "backgroundColor": {
          "metadata": {
            "description": "Cell background color as a hexadecimal value.",
            "format": "COLOR_VALUE"
          },
          "type": "string"
        }
      }
    },
    "TableCellData_BorderColors": {
      "optionalProperties": {
        "left": {
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Left border color as a hexadecimal value."
          },
          "type": "string"
        },
        "right": {
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Right border color as a hexadecimal value."
          },
          "type": "string"
        },
        "top": {
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Top border color as a hexadecimal value."
          },
          "type": "string"
        },
        "bottom": {
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Bottom border color as a hexadecimal value."
          },
          "type": "string"
        }
      }
    },
    "TableCellData_BorderWidths": {
      "optionalProperties": {
        "left": {
          "type": "uint32",
          "metadata": {
            "description": "Left border width."
          }
        },
        "right": {
          "type": "uint32",
          "metadata": {
            "description": "Right border width."
          }
        },
        "top": {
          "type": "uint32",
          "metadata": {
            "description": "Top border width."
          }
        },
        "bottom": {
          "type": "uint32",
          "metadata": {
            "description": "Bottom border width."
          }
        }
      }
    }
  }
}