{
  "namespace": "edu_common",

  "light_label": {
    "type": "label",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "color": "$generic_button_text_color",
    "layer": 1
  },

  "dark_label": {
    "type": "label",
    "color": "$title_text_color",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "layer": 1
  },

  // Requires specifying "$toggle_state_binding_name", "$toggle_enabled_binding_name", "$toggle_name"
  "slider_toggle@settings_common.option_toggle_control": {
    "size": [ "100%c", "100%c" ],
    "$enabled": true,
    "$toggle_enabled_binding_name|default": "#not_bound",
    "$option_enabled_binding_name": "#not_bound",
    // Doesn't need to be used but must exist as it'll be resolved as the default value of $toggle_state_binding_name
    "$option_binding_name": "#not_bound",
    "variables": []
  },

  "trash_default": {
    "type": "image",
    "texture": "textures/ui/trash_default"
  },

  "trash_hover": {
    "type": "image",
    "texture": "textures/ui/trash_hover"
  },

  "trash_pressed": {
    "type": "image",
    "texture": "textures/ui/trash_pressed"
  },

  "photo_trash_button": {
    "type": "button",
    "focus_enabled": true,
    "size": [ 11, 12 ],
    "layer": 1,
    "default_control": "default",
    "hover_control": "hover",
    "pressed_control": "pressed",
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "controls": [
      { "default@edu_common.trash_default": {} },
      { "hover@edu_common.trash_hover": {} },
      { "pressed@edu_common.trash_pressed": {} }
    ]
  },

  // A modal downloading window originally used by library_item_screen, moved here so it could be used by other screens.
  "download_progress_modal_panel@common.input_panel": {
    "layer": 201,
    "size": [ "100%", "100%" ],
    "button_mappings": [
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.download_cancel",
        "mapping_type": "global"
      }
    ],
    "bindings": [
      {
        "binding_name": "#is_download_in_progress",
        "binding_name_override": "#visible"
      }
    ],
    "controls": [
      {
        "downloading@edu_common.modal_progress_panel_with_cancel": {
          "layer": 1,
          "$pressed_button_name": "button.download_cancel"
        }
      }
    ]
  },

  "modal_progress_panel_with_cancel": {
    "type": "panel",
    "size": "$modal_screen_size",
    "$background_fill_alpha|default": 0.8,
    "$body_text|default": "",
    "controls": [
      {
        "common_panel@common.common_panel": {
          "$dialog_background": "dialog_background_hollow_2",
          "$fill_alpha": "$background_fill_alpha",
          "$show_close_button": false
        }
      },
      {
        "content": {
          "type": "panel",
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          // magic offset to make the scroll clipping perfect
          "size": [ "100%-12px", "100%-60px" ],
          "offset": [ 6, 20 ],
          "controls": [
            {
              "title_panel@progress.title_panel": {}
            },
            {
              "label": {
                "type": "label",
                "color": "$dark_button_default_text_color",
                "size": [ "100% - 20px", "100% - 20px" ],
                "anchor_from": "bottom_middle",
                "anchor_to": "bottom_middle",
                "layer": 1,
                "shadow": false,
                "text": "$body_text"
              }
            },
            {
              "progress_loading_bars@progress.progress_loading_bars": {}
            }
          ]
        }
      },
      {
        "cancel_button@edu_common.modal_cancel_button": {
          "anchor_from": "bottom_middle",
          "anchor_to": "bottom_middle",
          "size": [ "40%", "20%" ],
          "offset": [ 0, -8 ]
        }
      }
    ]
  },

  "modal_cancel_button@common_buttons.light_text_button": {
    "$pressed_button_name": "button.download_cancel",
    "$button_text": "gui.cancel"
  },

  "apple_animation_definition": {
    "anim_type": "flip_book",
    "initial_uv": [ 0, 0 ],
    "frame_count": 36,
    "frame_step": 64,
    "fps": 10,
    "easing": "linear"
  },

  "apple_animation": {
    "type": "image",
    "texture": "textures/ui/eating_apple",
    "uv": "@edu_common.apple_animation_definition",
    "uv_size": [ 64, 64 ]
  }
}

