export default {
  "metadata": { "section": "Collapsible List" },
  "definitions": {
    "CollapsibleListNode": {
      "metadata": {
        "tsRicosNode": true,
        "examples": ["collapsible-list"],
        "features": ["COLLAPSIBLE_LIST"],
        "description": "List of items where each item can be expanded or collapsed."
      },
      "properties": {
        "type": {
          "enum": ["COLLAPSIBLE_LIST"],
          "metadata": {
            "description": "Node type. \n Must be `COLLAPSIBLE_LIST`"
          }
        },
        "nodes": {
          "elements": {
            "ref": "CollapsibleItemNode"
          },
          "metadata": {
            "tsRicosNodesChildren": true,
            "description": "Collapsible list child nodes.",
            "validation": {
              "minSize": 1
            }
          }
        }
      },
      "optionalProperties": {
        "id": {
          "type": "string",
          "metadata": {
            "format": "NODE_ID",
            "description": "[Node ID](#node-ids)."
          }
        },
        "collapsibleListData": {
          "ref": "CollapsibleListData",
          "metadata": {
            "description": "Collapsible list details."
          }
        }
      }
    },
    "CollapsibleListData": {
      "optionalProperties": {
        "containerData": {
          "ref": "PluginContainerData",
          "metadata": {
            "description": "Collapsible list container styling."
          }
        },
        "expandOnlyOne": {
          "type": "boolean",
          "metadata": {
            "description": "Whether only one item can be expanded at a time. \n Default: `false`."
          }
        },
        "initialExpandedItems": {
          "enum": ["FIRST", "ALL", "NONE"],
          "metadata": {
            "emitEnum": "CollapsibleListData_InitialExpandedItems",
            "description": "Sets which items are automatically expanded after the page loads."
          }
        },
        "direction": {
          "enum": ["LTR", "RTL"],
          "metadata": {
            "emitEnum": "CollapsibleListData_Direction",
            "description": "Direction of the text in the list. Supported values: \n - `LTR`: Left to right. \n - `RTL`: Right to left."
          }
        },
        "isQapageData": {
          "type": "boolean",
          "metadata": {
            "description": "Whether the collapsible item will appear in search results as an FAQ."
          }
        }
      }
    },
    "CollapsibleItemNode": {
      "metadata": {
        "tsRicosNode": true
      },
      "properties": {
        "type": {
          "enum": ["COLLAPSIBLE_ITEM"],
          "metadata": {
            "description": "Node type. \n Must be `COLLAPSIBLE_ITEM`"
          }
        },
        "nodes": {
          "elements": {
            "ref": "CollapsibleItemChildNode"
          },
          "metadata": {
            "tsRicosNodesChildren": true,
            "description": "Collapsible list item.",
            "pattern": {
              "value": "COLLAPSIBLE_ITEM_TITLE COLLAPSIBLE_ITEM_BODY",
              "description": "Must contain title as the first item and body as the second."
            }
          }
        }
      },
      "optionalProperties": {
        "id": {
          "type": "string",
          "metadata": {
            "format": "NODE_ID",
            "description": "[Node ID](#node-ids)."
          }
        }
      }
    },
    "CollapsibleItemChildNode": {
      "metadata": {
        "refUnion": ["CollapsibleItemTitleNode", "CollapsibleItemBodyNode"]
      }
    },
    "CollapsibleItemTitleNode": {
      "metadata": {
        "tsRicosNode": true,
        "description": "Collapsible list item title."
      },
      "properties": {
        "type": {
          "enum": ["COLLAPSIBLE_ITEM_TITLE"],
          "metadata": {
            "description": "Node type. \n Must be `COLLAPSIBLE_ITEM_TITLE`."
          }
        },
        "nodes": {
          "elements": {
            "ref": "CollapsibleTitleChildNode"
          },
          "metadata": {
            "tsRicosNodesChildren": true,
            "description": "Collapsible list item title child nodes.",
            "validation": {
              "minSize": 1,
              "maxSize": 1
            }
          }
        }
      },
      "optionalProperties": {
        "id": {
          "type": "string",
          "metadata": {
            "format": "NODE_ID",
            "description": "[Node ID](#node-ids)."
          }
        }
      }
    },
    "CollapsibleTitleChildNode": {
      "metadata": { "refUnion": [
          "ParagraphNode",
          "HeadingNode",
          "BulletedListNode",
          "OrderedListNode",
          "CheckboxListNode",
          "BlockquoteNode",
          "CodeBlockNode"
      ]}
    },
    "CollapsibleItemBodyNode": {
      "metadata": {
        "tsRicosNode": true,
        "description": "Collapsible list item body."
      },
      "properties": {
        "type": {
          "enum": ["COLLAPSIBLE_ITEM_BODY"],
          "metadata": {
            "description": "Node type. \n Must be `COLLAPSIBLE_ITEM_BODY`."
          }
        },
        "nodes": {
          "elements": {
            "ref": "CollapsibleItemBodyChildNode"
          },
          "metadata": {
            "tsRicosNodesChildren": true,
            "description": "Collapsible list item body child nodes.",
            "validation": {
              "minSize": 1
            }
          }
        }
      },
      "optionalProperties": {
        "id": {
          "type": "string",
          "metadata": {
            "format": "NODE_ID",
            "description": "[Node ID](#node-ids)."
          }
        }
      }
    },
    "CollapsibleItemBodyChildNode": {
      "metadata": {
        "refUnion": [
          "ParagraphNode",
          "HeadingNode",
          "BulletedListNode",
          "OrderedListNode",
          "CheckboxListNode",
          "BlockquoteNode",
          "AudioNode",
          "FileNode",
          "ImageNode",
          "VideoNode",
          "GifNode",
          "DividerNode",
          "CodeBlockNode",
          "AppEmbedNode",
          "LinkPreviewNode",
          "GalleryNode",
          "ButtonNode",
          "CollapsibleListNode",
          "TableNode",
          "EmbedNode",
          "PollNode",
          "HtmlNode",
          "TocNode",
          "ShapeNode"
        ],
        "description": "Collapsible list item body."
      }
    }
  }
}