{
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "id": "http://jsonschema.net",
  "$ref": "http://localhost/system/content.schema",
  "properties": {
    "title": {
      "type": "string",
      "required": true,
      "default": "New Menu/Page Title",
      "inputType": "Text",
      "validators": ["required"],
      "translatable": true
    },
    "displayTitle": {
      "type": "string",
      "required": false,
      "default": "New Menu/Page Title",
      "inputType": "DisplayTitle",
      "validators": [],
      "help": "When viewing a menu/page - this is the title that will be displayed on the menu/page",
      "translatable": true
    },
    "pageBody":{
      "type": "string",
      "default" : "",
      "inputType": "TextArea",
      "validators": [],
      "translatable": true,
      "help": "If set, this text will be shown instead of the body text when this page is viewed."
    },
    "body":{
      "type": "string",
      "default" : "",
      "inputType": "TextArea",
      "validators": [],
      "translatable": true
    },
    "instruction": {
      "type": "string",
      "required": false,
      "title": "Instruction text",
      "default": "",
      "inputType": "Text",
      "validators": [],
      "translatable": true
    },
    "_htmlClassName": {
      "type": "string",
      "required": false,
      "title": "HTML Classes",
      "default": "",
      "inputType": "Text",
      "validators": [],
      "help": "If set, this CSS class/es will be applied to the <html> element whenever this is the active page in the course. These are predefined in the theme or added in Project Settings > Custom CSS/Less code."
    },
    "_graphic": {
      "type": "object",
      "title": "",
      "properties": {
        "alt": {
          "type": "string",
          "required": false,
          "default": "",
          "inputType": "Text",
          "validators": [],
          "help": "This is the alternative text that is displayed when the image is not visible. This is also used by screen readers.",
          "translatable": true
        },
        "src": {
          "type": "string",
          "required": false,
          "default": "",
          "inputType": "Asset:image",
          "validators": [],
          "help": "This is the link to the image."
        }
      }
    },
    "linkText": {
      "type": "string",
      "required": false,
      "title": "Button link text",
      "default": "View",
      "inputType": "Text",
      "validators" : ["required"],
      "translatable": true
    },
    "duration": {
      "type": "string",
      "required": false,
      "title": "Duration",
      "default": "",
      "inputType": "Text",
      "validators" : [""],
      "help": "Indicates how long this page or section should take to complete",
      "translatable": true
    },
    "_lockedBy": {
      "type": "array",
      "required": false,
      "default": [],
      "title": "Locked by",
      "inputType": "List",
      "validators": [],
      "help": "If the course is using a 'custom' Menu Lock Type, this should contain the unique ID of the item(s) which must be completed before this is unlocked"
    },
    "_lockType": {
      "type": "string",
      "default": "",
      "inputType": {
        "type": "Select",
        "options": [
          "",
          "custom",
          "lockLast",
          "sequential",
          "unlockFirst"
        ]
      },
      "title": "Menu lock type",
      "help": "Defines which (if any) locking mechanism will be used. To be used only on submenus.",
      "validators": []
    },
    "_classes": {
      "type": "string",
      "default": "",
      "isSetting": true,
      "inputType": "Text",
      "validators": [],
      "title": "Page Classes",
      "help": "Used to style or manipulate the look and feel of this Page (or submenu). These are predefined in the theme or added in Project Settings > Custom CSS/Less code."
    },
    "_isOptional": {
      "type": "boolean",
      "default": false,
      "isSetting": true,
      "inputType": "Checkbox",
      "validators": [],
      "title": "Is this optional?",
      "help": "An optional page does not have to be completed, nor do any of the articles, blocks and components contained within it."
    },
    "_isAvailable": {
      "type": "boolean",
      "default": true,
      "isSetting": true,
      "inputType": "Checkbox",
      "validators": [],
      "title": "Is this available?",
      "help": "Controls whether this page and its contents are available in the course or not."
    },
    "_isHidden": {
      "type": "boolean",
      "default": false,
      "isSetting": true,
      "inputType": "Checkbox",
      "validators": [],
      "title": "Is this hidden?",
      "help": "Hides this page from the course menu. Needs to be supported by the menu you are using in your course."
    },
    "_isVisible": {
      "type": "boolean",
      "default": true,
      "isSetting": true,
      "inputType": "Checkbox",
      "validators": [],
      "title": "Is this visible?",
      "help": "Equivalent to the CSS visibility property. Unless you have custom code that uses this, it is highly unlikely you would want to change this setting at a page level."
    },
    "_ariaLevel": {
      "type": "number",
      "default": 0,
      "isSetting": true,
      "inputType": "Number",
      "validators": ["number"],
      "help": "If you need to override the default page ARIA level (as defined in Configuration Settings), set this to any number greater than 0."
    },
    "_onScreen": {
      "type": "object",
      "title": "On-screen classes",
      "help": "These settings allow you to attach classes to the page when it is within the browser's viewport; helpful for running CSS-based animations on pages as they scroll into view.",
      "properties": {
        "_isEnabled": {
          "type": "boolean",
          "default": false,
          "isSetting": true,
          "inputType": "Checkbox",
          "validators": [],
          "title": "Enabled?"
        },
        "_classes": {
          "type": "string",
          "default": "",
          "isSetting": true,
          "required": false,
          "inputType": "Text",
          "validators": [],
          "title": "Classes",
          "help": "The CSS class(es) to add to the page element."
        },
        "_percentInviewVertical": {
          "type": "number",
          "required": false,
          "default": 50,
          "isSetting": true,
          "title": "Percent in view",
          "inputType": "Number",
          "validators": ["number"],
          "help": "Controls what percentage of the page's height needs to be in the viewport in order for the CSS class(es) to be added."
        }
      }
    },
    "_extensions": {
      "type": "object"
    },
    "_sortOrder": {
      "type": "number",
      "required": true,
      "default": 1,
      "editorOnly": true
    },
    "menuSettings": {
      "type": "object"
    },
    "themeSettings": {
      "type": "object"
    }
  }
}
