[
  {
    "name": "branchingScenario",
    "type": "group",
    "widget": "branchingScenario",
    "label": "Branching Scenario Editor",
    "importance": "high",
    "fields": [
      {
        "name": "title",
        "label": "Title",
        "type": "text",
        "importance": "high"
      },
      {
        "name": "startScreen",
        "label": "Start screen",
        "type": "group",
        "importance": "low",
        "fields": [
          {
            "name": "startScreenTitle",
            "label": "Course Title",
            "placeholder": "Title for your course",
            "type": "text",
            "importance": "medium",
            "optional": true
          },
          {
            "name": "startScreenSubtitle",
            "label": "Course Details",
            "placeholder": "Details about the course",
            "type": "text",
            "importance": "medium",
            "optional": true
          },
          {
            "name": "startScreenImage",
            "label": "Course image",
            "type": "image",
            "optional": true,
            "importance": "medium"
          }
        ]
      },
      {
        "name": "endScreens",
        "label": "List of end screens",
        "type": "list",
        "importance": "medium",
        "field": {
          "name": "endScreen",
          "label": "End screen",
          "type": "group",
          "importance": "low",
          "fields": [
            {
              "name": "endScreenTitle",
              "label": "Title",
              "type": "text",
              "importance": "medium",
              "optional": true
            },
            {
              "name": "endScreenSubtitle",
              "label": "Text",
              "type": "text",
              "importance": "medium",
              "optional": true
            },
            {
              "name": "endScreenImage",
              "label": "Image",
              "type": "image",
              "importance": "medium",
              "optional": true
            },
            {
              "name": "endScreenScore",
              "label": "Score",
              "description": "The score will be sent to any LMS, LRS or any other connected service that receives scores from H5P for users who reach the default end scenario",
              "type": "number",
              "default": 0,
              "optional": true
            },
            {
              "name": "contentId",
              "label": "Content ID",
              "type": "number",
              "max": 0,
              "widget": "none"
            }
          ]
        }
      },
      {
        "name": "content",
        "label": "List of branching scenario content",
        "importance": "high",
        "type": "list",
        "min": 1,
        "entity": "content",
        "field": {
          "name": "content",
          "type": "group",
          "fields": [
            {
              "name": "type",
              "type": "library",
              "importance": "high",
              "options": [
                "H5P.BranchingQuestion 1.0",
                "H5P.CoursePresentation 1.21",
                "H5P.AdvancedText 1.1",
                "H5P.Image 1.1",
                "H5P.ImageHotspots 1.8",
                "H5P.InteractiveVideo 1.21",
                "H5P.Video 1.5"
              ]
            },
            {
              "name": "showContentTitle",
              "label": "Show content title in view",
              "description": "If selected, the user will see the content title in the top bar above this content",
              "type": "boolean",
              "importance": "high"
            },
            {
              "name": "nextContentId",
              "label": "Next Content ID (end screens are defined by negative numbers)",
              "type": "number",
              "importance": "high",
              "widget": "none"
            },
            {
              "name": "feedback",
              "type": "group",
              "label": "Feedback",
              "fields": [
                {
                  "name": "title",
                  "type": "text",
                  "label": "Feedback title",
                  "optional": true
                },
                {
                  "name": "subtitle",
                  "type": "text",
                  "label": "Feedback text",
                  "optional": true,
                  "widget": "html",
                  "enterMode": "p",
                  "tags": [
                    "strong",
                    "em",
                    "del",
                    "code"
                  ]
                },
                {
                  "name": "image",
                  "type": "image",
                  "label": "Feedback image",
                  "optional": true
                },
                {
                  "name": "endScreenScore",
                  "type": "number",
                  "label": "Score for this scenario",
                  "description": "The score will be sent to any LMS, LRS or any other connected service that receives scores from H5P for users who reach this scenario",
                  "optional": true
                }
              ]
            }
          ]
        }
      },
      {
        "name": "scoringOption",
        "type": "group",
        "label": "Scoring options",
        "importance": "low",
        "fields": [
          {
            "name": "scoringOption",
            "label": "Scoring options",
            "type": "select",
            "description": "Select type of scoring",
            "options": [
              {
                "value": "static-end-score",
                "label": "Statically set score for each end scenario"
              },
              {
                "value": "dynamic-score",
                "label": "Dynamically calculate score from user answers"
              },
              {
                "value": "no-score",
                "label": "No scoring"
              }
            ],
            "default": "no-score"
          }
        ]
      },
      {
        "name": "l10n",
        "type": "group",
        "label": "Localization",
        "importance": "low",
        "common": true,
        "fields": [
          {
            "name": "startScreenButtonText",
            "label": "Text for the button on the start screen",
            "type": "text",
            "importance": "low",
            "default": "Start the course"
          },
          {
            "name": "endScreenButtonText",
            "label": "Text for the button on the end screen",
            "type": "text",
            "importance": "low",
            "default": "Restart the course"
          },
          {
            "name": "proceedButtonText",
            "label": "Text for the button on each of the library screens",
            "type": "text",
            "importance": "low",
            "default": "Proceed"
          },
          {
            "name": "scoreText",
            "label": "Label for score on the end screen",
            "type": "text",
            "importance": "low",
            "default": "Your score:"
          }
        ]
      }
    ]
  }
]
