{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "headline": {
            "type": "object",
            "description": "The HTML text to be shown as a headline.",
            "properties": {
                "i18nHtmlText": {
                    "type": [
                        "string",
                        "object"
                    ],
                    "description": "The (internationalized) HTML headline content."
                },
                "level": {
                    "type": "integer",
                    "description": "The hierarchical level of the headline (1 to 6).",
                    "minimum": 1,
                    "maximum": 6,
                    "default": 1
                }
            },
            "additionalProperties": false
        },
        "intro": {
            "type": "object",
            "description": "Additional introductory HTML text to be shown below the headline.",
            "properties": {
                "i18nHtmlText": {
                    "type": [
                        "string",
                        "object"
                    ],
                    "description": "The (internationalized) HTML intro content."
                }
            },
            "additionalProperties": false
        },
        "buttons": {
            "type": "array",
            "description": "A list of buttons to be displayed next to the headline, each with individual action and other properties.",
            "default": [],
            "items": {
                "type": "object",
                "required": [
                    "action"
                ],
                "additionalProperties": false,
                "properties": {
                    "enabled": {
                        "type": "boolean",
                        "description": "Determines if the button is used at all (true) or ignored completely (false).",
                        "default": true
                    },
                    "align": {
                        "type": "string",
                        "description": "The position relative to the headline.",
                        "enum": [
                            "LEFT",
                            "RIGHT"
                        ],
                        "default": "RIGHT"
                    },
                    "index": {
                        "type": "integer",
                        "description": "The position at which the button is inserted.",
                        "default": 0
                    },
                    "i18nHtmlLabel": {
                        "type": [
                            "string",
                            "object"
                        ],
                        "description": "An (internationalized) HTML label to display on the button."
                    },
                    "action": {
                        "type": "string",
                        "format": "topic",
                        "axRole": "outlet",
                        "description": "Topic name of the action to request taking upon button activation."
                    },
                    "accessKey": {
                        "type": "string",
                        "description": "A key (single character) which is used as a shortcut to this button."
                    },
                    "class": {
                        "type": "string",
                        "description": "The predefined semantic class that this button belongs to.",
                        "enum": [
                            "NORMAL",
                            "PRIMARY",
                            "INFO",
                            "SUCCESS",
                            "WARNING",
                            "DANGER",
                            "INVERSE",
                            "LINK"
                        ],
                        "default": "NORMAL"
                    },
                    "size": {
                        "type": "string",
                        "description": "The size of the button on the bar, interpreted according to theme.",
                        "enum": [
                            "MINI",
                            "SMALL",
                            "DEFAULT",
                            "LARGE"
                        ],
                        "default": "DEFAULT"
                    },
                    "hideOn": {
                        "type": "array",
                        "description": "List of flags. Setting any of these causes the button to be hidden from view, unsetting any reverses the effect. Space for the button is reserved in either state.",
                        "items": {
                            "type": "string",
                            "format": "flag-topic",
                            "axRole": "inlet",
                            "axPattern": "flag",
                            "description": "Flag topic. Prefixing the topic with '!' inverts its meaning."
                        }
                    },
                    "disableOn": {
                        "type": "array",
                        "description": "List of flags. Setting any of these causes the button to be disabled ('greyed out'), unsetting any reverses the effect.",
                        "items": {
                            "type": "string",
                            "format": "flag-topic",
                            "axRole": "inlet",
                            "axPattern": "flag",
                            "description": "Flag topic. Prefixing the topic with '!' inverts its meaning."
                        }
                    },
                    "omitOn": {
                        "type": "array",
                        "description": "List of flags. Setting any of these causes the button to be removed from the layout, unsetting any reverses the effect. Other buttons may claim this button's space while it is omitted.",
                        "items": {
                            "type": "string",
                            "format": "flag-topic",
                            "axRole": "inlet",
                            "axPattern": "flag",
                            "description": "Flag topic. Prefixing the topic with '!' inverts its meaning."
                        }
                    },
                    "busyOn": {
                        "type": "array",
                        "description": "List of flags. Setting any of these causes the button (icon) to indicate a busy state, unsetting any reverses the effect.",
                        "items": {
                            "type": "string",
                            "format": "flag-topic",
                            "axRole": "inlet",
                            "axPattern": "flag",
                            "description": "Flag topic. Prefixing the topic with '!' inverts its meaning."
                        }
                    }
                }
            }
        },
        "buttonArea": {
            "type": "object",
            "description": "Additional introductory HTML text to be shown below the headline.",
            "properties": {
                "align": {
                    "type": "string",
                    "description": "The position of the buttons. Either on the left side of the headline or on the right side.",
                    "enum": [
                        "LEFT",
                        "RIGHT"
                    ]
                }
            }
        },
        "i18n": {
            "description": "Which locale to use for displaying this widget.",
            "type": "object",
            "properties": {
                "locale": {
                    "type": "string",
                    "format": "topic",
                    "axRole": "inlet",
                    "description": "The topic under which to expect the locale for this widget.",
                    "default": "default"
                }
            }
        }
    }
}