{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://cdn.jsdelivr.net/npm/@pie-element/graphing-solution-set@7.0.6/dist/schemas/configuration.schema.json",
  "type": "object",
  "properties": {
    "authoring": {
      "$ref": "#/definitions/AuthoringConfigProp",
      "description": "Grid Setup Panel configuration"
    },
    "arrows": {
      "$ref": "#/definitions/ArrowsConfigProp",
      "description": "Arrows configuration"
    },
    "coordinatesOnHover": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Coordinates configuration"
    },
    "contentDimensions": {
      "$ref": "#/definitions/ContentDimensions",
      "description": "Minimum and maximum dimensions of the authoring view"
    },
    "graphDimensions": {
      "$ref": "#/definitions/DimensionsConfigProp",
      "description": "Graph dimensions configuration"
    },
    "gridConfigurations": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/GridConfiguration"
      },
      "description": "Grid default configurations"
    },
    "instruction": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Instructions shown at the top of the authoring view"
    },
    "padding": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Padding configuration"
    },
    "labels": {
      "$ref": "#/definitions/LabelsConfigProp",
      "description": "Labels configuration"
    },
    "language": {
      "$ref": "#/definitions/ConfigurePropWithEnabled",
      "description": "Language configuration"
    },
    "languageChoices": {
      "$ref": "#/definitions/ConfigureLanguageOptions",
      "description": "Language choices configuration Only available if language is enabled"
    },
    "prompt": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Configuration for the prompt"
    },
    "rationale": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Configuration for the rationale"
    },
    "settingsPanelDisabled": {
      "type": "boolean",
      "description": "Indicates if the settings panel is not available"
    },
    "spellCheck": {
      "$ref": "#/definitions/ConfigurePropWithEnabled",
      "description": "Configuration for the author's spellcheck"
    },
    "scoringType": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Scoring Type configuration"
    },
    "studentInstructions": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Student Instructions configuration"
    },
    "teacherInstructions": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Teacher Instructions configuration"
    },
    "title": {
      "$ref": "#/definitions/TitleConfigProp",
      "description": "Graph title configuration"
    },
    "maxImageWidth": {
      "$ref": "#/definitions/ConfigureMaxImageDimensionsProp",
      "description": "Maximum image width for input fields"
    },
    "maxImageHeight": {
      "$ref": "#/definitions/ConfigureMaxImageDimensionsProp",
      "description": "Maximum image height for input fields"
    },
    "withRubric": {
      "$ref": "#/definitions/ConfigureProp",
      "description": "Rubric configuration - only relevant in environments that use pie-player-components"
    },
    "mathMlOptions": {
      "$ref": "#/definitions/ConfigureMathMLProp",
      "description": "Configuration for editable-html"
    },
    "showPrompt": {
      "type": "boolean",
      "description": "Not read by this element."
    },
    "promptLabel": {
      "type": "string",
      "description": "Not read by this element."
    },
    "settingsPartialScoring": {
      "type": "boolean",
      "description": "Not read by this element."
    }
  },
  "definitions": {
    "AuthoringConfigProp": {
      "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)"
        },
        "includeAxesEnabled": {
          "type": "boolean",
          "description": "Indicates if the \"Include axes and labels?\" toggle is displayed in the Grid Setup Panel"
        },
        "standardGridEnabled": {
          "type": "boolean",
          "description": "Indicates if the \"Constrain to standard coordinate grid?\" toggle is displayed in the Grid Setup Panel"
        },
        "min": {
          "$ref": "#/definitions/GridPanelConfigProp",
          "description": "Min value configuration"
        },
        "max": {
          "$ref": "#/definitions/GridPanelConfigProp",
          "description": "Max value configuration"
        },
        "axisLabel": {
          "$ref": "#/definitions/GridPanelConfigProp",
          "description": "Axis label configuration"
        },
        "step": {
          "$ref": "#/definitions/GridPanelConfigProp",
          "description": "Step value configuration"
        },
        "labelStep": {
          "$ref": "#/definitions/GridPanelConfigProp",
          "description": "Label step value configuration"
        }
      }
    },
    "GridPanelConfigProp": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "description": "Label for the field in the Grid Setup Panel"
        },
        "enabled": {
          "type": "boolean",
          "description": "Indicates if the field is displayed in the Grid Setup Panel"
        }
      }
    },
    "ArrowsConfigProp": {
      "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"
        },
        "left": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Configuration for the left arrow checkbox"
        },
        "right": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Configuration for the right arrow checkbox"
        },
        "up": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Configuration for the up arrow checkbox"
        },
        "down": {
          "$ref": "#/definitions/ConfigureProp",
          "description": "Configuration for the down arrow checkbox"
        }
      }
    },
    "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."
    },
    "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."
    },
    "DimensionsConfigProp": {
      "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)"
        },
        "min": {
          "type": "number",
          "description": "Minimum graph dimension, in pixels"
        },
        "max": {
          "type": "number",
          "description": "Maximum graph dimension, in pixels"
        },
        "step": {
          "type": "number",
          "description": "Step between graph dimensions, in pixels"
        }
      }
    },
    "GridConfiguration": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "description": "Name shown in the grid configuration picker"
        },
        "arrows": {
          "$ref": "#/definitions/Arrows",
          "description": "Arrows for the grid"
        },
        "domain": {
          "$ref": "#/definitions/GraphSettings",
          "description": "Domain settings for the grid"
        },
        "graph": {
          "$ref": "#/definitions/Graph",
          "description": "Graph dimensions for the grid"
        },
        "includeAxes": {
          "type": "boolean",
          "description": "Indicates if the graph axes and labels are enabled"
        },
        "labels": {
          "$ref": "#/definitions/Labels",
          "description": "Labels for the grid"
        },
        "padding": {
          "type": "boolean",
          "description": "Indicates if padding is enabled"
        },
        "range": {
          "$ref": "#/definitions/GraphSettings",
          "description": "Range settings for the grid"
        },
        "standardGrid": {
          "type": "boolean",
          "description": "Indicates if domain values are synched to the range values"
        },
        "title": {
          "type": "string",
          "description": "Graph title"
        }
      },
      "description": "A preset grid an author picks from; selecting it copies these values into the model."
    },
    "Arrows": {
      "type": "object",
      "properties": {
        "left": {
          "type": "boolean",
          "description": "Indicates if left arrow is enabled"
        },
        "right": {
          "type": "boolean",
          "description": "Indicates if right arrow is enabled"
        },
        "up": {
          "type": "boolean",
          "description": "Indicates if up arrow is enabled"
        },
        "down": {
          "type": "boolean",
          "description": "Indicates if down arrow is enabled"
        }
      },
      "required": [
        "left",
        "right",
        "up",
        "down"
      ]
    },
    "GraphSettings": {
      "type": "object",
      "properties": {
        "min": {
          "type": "number",
          "description": "Min value"
        },
        "max": {
          "type": "number",
          "description": "Max value"
        },
        "padding": {
          "type": "number",
          "description": "Padding value"
        },
        "step": {
          "type": "number",
          "description": "Step value"
        },
        "labelStep": {
          "type": "number",
          "description": "Label step value"
        },
        "axisLabel": {
          "type": "string",
          "description": "Axis Label"
        }
      },
      "required": [
        "min",
        "max",
        "step",
        "labelStep",
        "axisLabel"
      ]
    },
    "Graph": {
      "type": "object",
      "properties": {
        "width": {
          "type": "number",
          "description": "Width for graph representation"
        },
        "height": {
          "type": "number",
          "description": "Height for graph representation"
        }
      },
      "required": [
        "width",
        "height"
      ]
    },
    "Labels": {
      "type": "object",
      "properties": {
        "top": {
          "type": "string",
          "description": "Label for top side of the graph"
        },
        "bottom": {
          "type": "string",
          "description": "Label for bottom side of the graph"
        },
        "left": {
          "type": "string",
          "description": "Label for left side of the graph"
        },
        "right": {
          "type": "string",
          "description": "Label for right side of the graph"
        }
      }
    },
    "LabelsConfigProp": {
      "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)"
        },
        "top": {
          "type": "string",
          "description": "Placeholder for the top label"
        },
        "right": {
          "type": "string",
          "description": "Placeholder for the right label"
        },
        "bottom": {
          "type": "string",
          "description": "Placeholder for the bottom label"
        },
        "left": {
          "type": "string",
          "description": "Placeholder for the left label"
        }
      }
    },
    "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)"
        }
      }
    },
    "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"
      ]
    },
    "TitleConfigProp": {
      "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)"
        },
        "placeholder": {
          "type": "string",
          "description": "Placeholder for the graph title"
        }
      }
    },
    "ConfigureMaxImageDimensionsProp": {
      "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"
        }
      },
      "description": "Maximum image dimensions per editable field. Elements extend it with their own fields."
    },
    "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"
        }
      }
    }
  },
  "additionalProperties": false
}
