{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://cdn.jsdelivr.net/npm/@pie-element/ebsr@15.0.6/dist/schemas/configuration.schema.json",
  "type": "object",
  "properties": {
    "partA": {
      "$ref": "#/definitions/MultipleChoiceConfiguration",
      "description": "Indicates configuration for part A"
    },
    "partB": {
      "$ref": "#/definitions/MultipleChoiceConfiguration",
      "description": "Indicates configuration for part B"
    },
    "partLabels": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Part labels (Configuration for both parts)"
    },
    "partialScoring": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Indicates whether the settings panel wil allow the author to modify settings for partial scoring"
    },
    "settingsPanelDisabled": {
      "type": "boolean",
      "description": "Indicates if the settings panel is not available"
    },
    "scoringType": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Indicates whether the Scoring type option should be displayed"
    },
    "baseInputConfiguration": {
      "$ref": "#/definitions/EditableHtmlConfigureProp",
      "description": "Toolbar plugins every editable field of both parts starts from; it replaces each part's own `baseInputConfiguration`"
    },
    "language": {
      "$ref": "#/definitions/ConfigurePropWithEnabled",
      "description": "Settings Panel control for the language; `enabled` shows the language choices"
    },
    "languageChoices": {
      "$ref": "#/definitions/ConfigureLanguageOptions",
      "description": "Language choices configuration Only available if language is enabled"
    },
    "contentDimensions": {
      "$ref": "#/definitions/ContentDimensions",
      "description": "Dimensions of the authoring container"
    },
    "showPrompt": {
      "type": "boolean",
      "description": "Not read by this element: each part's `promptEnabled` shows its prompt"
    },
    "promptLabel": {
      "type": "string",
      "description": "Not read by this element: each part's `prompt.label` labels its prompt"
    },
    "settingsPartialScoring": {
      "type": "boolean",
      "description": "Not read by this element: `partialScoring.settings` shows the partial scoring control"
    }
  },
  "description": "Config Object for `@pie-element/ebsr`",
  "definitions": {
    "MultipleChoiceConfiguration": {
      "type": "object",
      "properties": {
        "answerChoiceCount": {
          "type": "number",
          "description": "The number of empty choices to show in config view if no choice model is provided",
          "minimum": 0,
          "default": 0
        },
        "addChoiceButton": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Configuration for the button that adds a choice"
        },
        "baseInputConfiguration": {
          "$ref": "#/definitions/EditableHtmlConfigureProp",
          "description": "Toolbar plugins every editable field starts from; a field's own `inputConfiguration` overrides it"
        },
        "choices": {
          "$ref": "#/definitions/EditableHtmlPluginConfigure",
          "description": "Configuration for the choice editors"
        },
        "choiceMode": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Settings Panel control for the choice mode (radio / checkboxes)"
        },
        "choicePrefix": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Settings Panel control for the choice prefix"
        },
        "deleteChoice": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Whether the author can delete choices"
        },
        "feedback": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Settings Panel control for feedback"
        },
        "prompt": {
          "$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
          "description": "Configuration for the prompt"
        },
        "spellCheck": {
          "$ref": "#/definitions/ConfigurePropWithEnabled",
          "description": "Settings Panel control for spellcheck; `enabled` is the default for new items"
        },
        "choicesLayout": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Settings Panel control for the choices layout"
        },
        "gridColumns": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Settings Panel control for the number of grid columns"
        },
        "lockChoiceOrder": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Settings Panel control for locking the choice order"
        },
        "partialScoring": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Settings Panel control for partial scoring"
        },
        "rationale": {
          "$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
          "description": "Configuration for the choice rationales"
        },
        "scoringType": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Settings Panel control for the scoring type"
        },
        "settingsPanelDisabled": {
          "type": "boolean",
          "description": "Indicates if the settings panel is not available"
        },
        "studentInstructions": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Settings Panel control for student instructions"
        },
        "teacherInstructions": {
          "$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
          "description": "Configuration for the teacher instructions"
        },
        "toolbarEditorPosition": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Not read by the authoring surface; the model's `toolbarEditorPosition` sets the position"
        },
        "sequentialChoiceLabels": {
          "$ref": "#/definitions/ConfigurePropWithEnabled",
          "description": "Settings Panel control that toggles sequential choice labels"
        },
        "accessibility": {
          "$ref": "#/definitions/EditableHtmlPluginConfigure",
          "description": "Not read by this element"
        },
        "minAnswerChoices": {
          "type": "number",
          "description": "Minimum number of answer choices"
        },
        "maxAnswerChoices": {
          "type": "number",
          "description": "Maximum number of answer choices"
        },
        "maxImageWidth": {
          "$ref": "#/definitions/MaxImageDimensions",
          "description": "Maximum image width per field"
        },
        "maxImageHeight": {
          "$ref": "#/definitions/MaxImageDimensions",
          "description": "Maximum image height per field"
        },
        "withRubric": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Settings Panel control for the rubric"
        },
        "mathMlOptions": {
          "$ref": "#/definitions/ConfigureMathMLProp",
          "description": "MathML output and editing"
        },
        "language": {
          "$ref": "#/definitions/ConfigurePropWithEnabled",
          "description": "Settings Panel control for the language; `enabled` shows the language choices"
        },
        "languageChoices": {
          "$ref": "#/definitions/ConfigureLanguageOptions",
          "description": "Language choices configuration Only available if language is enabled"
        },
        "showPrompt": {
          "type": "boolean",
          "description": "Not read by this element: the model's `promptEnabled` shows the prompt"
        },
        "promptLabel": {
          "type": "string",
          "description": "Not read by this element: `prompt.label` labels the prompt"
        },
        "contentDimensions": {
          "$ref": "#/definitions/ContentDimensions",
          "description": "Dimensions of the authoring container"
        },
        "settingsPartialScoring": {
          "type": "boolean",
          "description": "Not read by this element: `partialScoring.settings` shows the partial scoring control"
        }
      },
      "description": "Config Object for `@pie-element/multiple-choice`"
    },
    "ConfigureProp": {
      "type": "object",
      "properties": {
        "settings": {
          "type": "boolean",
          "description": "Indicates if the item has to be displayed in the Settings Panel"
        },
        "label": {
          "type": "string",
          "description": "Indicates the label for the item that has to be displayed in the Settings Panel"
        }
      },
      "description": "Building blocks of an element's authoring configuration: the object a host passes to the `<tag>-config` custom element to decide which settings the author sees and how editors behave.\n\nEach element declares its own `<Name>Configuration` interface from these, and its JSON Schema is generated from that interface. Descriptions are carried over from the legacy `pie-elements` config schemas, so they appear in the generated schemas unchanged."
    },
    "EditableHtmlConfigureProp": {
      "type": "object",
      "properties": {
        "math": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "audio": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "video": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "image": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "customPlugins": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomPlugin"
          },
          "description": "An array of objects that determine custom plugins. A custom plugin is an object which determines how the button will look like (icon) and the event name that will be triggered when the button gets pressed (event)."
        },
        "blockquote": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "h3": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "characters": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "bold": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "html": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "italic": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "ol_list": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "redo": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "strikethrough": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "sub": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "sup": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "table": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "ul_list": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "underline": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "undo": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "textAlign": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "showParagraphs": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "separateParagraphs": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "pasteFormatting": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "superscript": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "subscript": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "languageCharacters": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        },
        "responseArea": {
          "$ref": "#/definitions/EditableHtmlButtonConfigure"
        }
      },
      "description": "Toolbar plugins of an editable-html field, keyed by plugin name."
    },
    "EditableHtmlButtonConfigure": {
      "type": "object",
      "properties": {
        "disabled": {
          "type": "boolean",
          "description": "Indicates if the plugin is disabled or not"
        }
      }
    },
    "CustomPlugin": {
      "type": "object",
      "properties": {
        "event": {
          "type": "string",
          "description": "The name of the custom event. It needs to be valid (only letters, numbers and \"_\" can be used). The event is emitted with the \"PIE-\" prefix."
        },
        "iconAlt": {
          "type": "string",
          "description": "The alt for the custom button icon"
        },
        "iconType": {
          "type": "string",
          "description": "The icon type. Currently, only \"SVG\" is supported."
        },
        "icon": {
          "type": "string",
          "description": "The icon string. Currently, only SVG is supported, so it needs to be a valid svg."
        }
      },
      "required": [
        "event",
        "iconAlt",
        "iconType",
        "icon"
      ]
    },
    "EditableHtmlPluginConfigure": {
      "type": "object",
      "properties": {
        "settings": {
          "type": "boolean",
          "description": "Indicates if the item has to be displayed in the Settings Panel"
        },
        "label": {
          "type": "string",
          "description": "Indicates the label for the item that has to be displayed in the Settings Panel"
        },
        "inputConfiguration": {
          "$ref": "#/definitions/EditableHtmlConfigureProp",
          "description": "Configuration for editable-html"
        }
      }
    },
    "EditableHtmlPluginConfigureRequired": {
      "type": "object",
      "properties": {
        "settings": {
          "type": "boolean",
          "description": "Indicates if the item has to be displayed in the Settings Panel"
        },
        "label": {
          "type": "string",
          "description": "Indicates the label for the item that has to be displayed in the Settings Panel"
        },
        "inputConfiguration": {
          "$ref": "#/definitions/EditableHtmlConfigureProp",
          "description": "Configuration for editable-html"
        },
        "required": {
          "type": "boolean",
          "description": "Indicates if the item is required and the value cannot be empty"
        }
      }
    },
    "ConfigurePropWithEnabled": {
      "type": "object",
      "properties": {
        "settings": {
          "type": "boolean",
          "description": "Indicates if the item has to be displayed in the Settings Panel"
        },
        "label": {
          "type": "string",
          "description": "Indicates the label for the item that has to be displayed in the Settings Panel"
        },
        "enabled": {
          "type": "boolean",
          "description": "Indicates the value of the item if it affects config-ui (eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)"
        }
      }
    },
    "MaxImageDimensions": {
      "type": "object",
      "properties": {
        "teacherInstructions": {
          "type": "number",
          "description": "Indicates the max dimension for images in teacher instructions"
        },
        "prompt": {
          "type": "number",
          "description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified"
        },
        "rationale": {
          "type": "number",
          "description": "Indicates the max dimension for images in rationale"
        },
        "choices": {
          "type": "number",
          "description": "Indicates the max dimension for images in choices"
        }
      }
    },
    "ConfigureMathMLProp": {
      "type": "object",
      "properties": {
        "mmlOutput": {
          "type": "boolean",
          "description": "Indicates if model should have mathML output instead of latex"
        },
        "mmlEditing": {
          "type": "boolean",
          "description": "Indicates if mathML that's already in model should be editable"
        }
      }
    },
    "ConfigureLanguageOptions": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string"
        },
        "options": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConfigureLanguageOptionsProp"
          }
        }
      },
      "required": [
        "label",
        "options"
      ]
    },
    "ConfigureLanguageOptionsProp": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "description": "Value of the language option"
        },
        "label": {
          "type": "string",
          "description": "Label of the language option"
        }
      },
      "required": [
        "value",
        "label"
      ]
    },
    "ContentDimensions": {
      "type": "object",
      "properties": {
        "maxHeight": {
          "type": [
            "string",
            "number"
          ]
        },
        "maxWidth": {
          "type": [
            "string",
            "number"
          ]
        },
        "minHeight": {
          "type": [
            "string",
            "number"
          ]
        },
        "minWidth": {
          "type": [
            "string",
            "number"
          ]
        }
      },
      "description": "Indicates the dimensions configuration for the authoring container. Note: Some items have a default minimum width because of their content, but if a lower minWidth is provided, it will be used."
    }
  },
  "additionalProperties": false
}
