{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "areas": {
            "type": "array",
            "description": "A list of widget areas with individual properties.",
            "items": {
                "type": "object",
                "required": [
                    "name",
                    "i18nHtmlLabel"
                ],
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Name of the widget-area to create."
                    },
                    "i18nHtmlLabel": {
                        "type": [
                            "string",
                            "object"
                        ],
                        "description": "Label of the area's tab.",
                        "format": "localization",
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "anonymize": {
                        "type": "boolean",
                        "default": false,
                        "description": "If true the class 'ax-anonymize-me' is set on the label to support anonymization."
                    },
                    "flag": {
                        "type": "string",
                        "format": "topic",
                        "axRole": "outlet",
                        "description": "Name of the flag indicating the area's visibility."
                    },
                    "validOn": {
                        "type": "string",
                        "format": "flag-topic",
                        "axRole": "inlet",
                        "axPattern": "flag",
                        "description": "Name of the flag toggling the area's visualisation of validity."
                    },
                    "disabledOn": {
                        "type": "string",
                        "format": "flag-topic",
                        "axRole": "inlet",
                        "axPattern": "flag",
                        "description": "Name of the flag toggling the area's disabled state."
                    },
                    "taggedOn": {
                        "type": "string",
                        "format": "flag-topic",
                        "axRole": "inlet",
                        "axPattern": "flag",
                        "description": "Name of the flag toggling the 'is-tagged' class on the according area."
                    },
                    "selection": {
                        "type": "object",
                        "description": "Action that is emitted after the (possibly confirmed) selection of an area.",
                        "properties": {
                            "action": {
                                "type": "string",
                                "format": "topic",
                                "axRole": "outlet",
                                "description": "The selection action topic."
                            }
                        }
                    },
                    "selectionRequest": {
                        "type": "object",
                        "description": "Actions under which the widget requests selection of this area and then waits for confirmation.",
                        "properties": {
                            "action": {
                                "type": "string",
                                "format": "topic",
                                "axRole": "outlet",
                                "description": "Action topic to request a selection of this area."
                            },
                            "confirmationAction": {
                                "type": "string",
                                "format": "topic",
                                "axRole": "inlet",
                                "axPattern": "action",
                                "description": "Confirmation action topic."
                            }
                        }
                    },
                    "selectionRequestTrigger": {
                        "type": "object",
                        "description": "Action upon which the widget requests selection of the given area.",
                        "properties": {
                            "onActions": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "format": "topic",
                                    "axRole": "inlet",
                                    "axPattern": "action",
                                    "description": "The action topic to trigger a selection request for this area."
                                },
                                "description": "Trigger action topics."
                            }
                        }
                    }
                }
            }
        },
        "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"
                }
            }
        }
    }
}