[
  {
    "id": "bodypart_status_indicator_template",
    "type": "widget",
    "style": "clause",
    "clauses": [
      { "id": "bitten", "text": "bitten", "sym": "B", "color": "yellow", "condition": { "u_has_effect": "bite" } },
      {
        "id": "infected",
        "text": "infected",
        "sym": "I",
        "color": "pink",
        "condition": { "u_has_effect": "infected" }
      },
      {
        "id": "broken",
        "text": "broken",
        "sym": "%",
        "color": "magenta",
        "condition": { "compare_num": [ { "u_val": "hp" }, "==", { "const": 0 } ] }
      },
      {
        "id": "splinted",
        "text": "splinted",
        "sym": "=",
        "color": "light_gray",
        "condition": { "u_has_worn_with_flag": "SPLINT" }
      },
      {
        "id": "bandaged",
        "text": "bandaged",
        "sym": "+",
        "color": "white",
        "condition": { "u_has_effect": "bandaged" }
      },
      {
        "id": "disinfected",
        "text": "disinfected",
        "sym": "$",
        "color": "light_green",
        "condition": { "u_has_effect": "disinfected" }
      },
      {
        "id": "bleeding",
        "text": "bleeding",
        "sym": "b",
        "color": "light_red",
        "condition": {
          "and": [
            { "u_has_effect": "bleed", "intensity": 1 },
            { "compare_num": [ { "u_val": "effect_intensity", "effect": "bleed" }, "<", { "const": 11 } ] }
          ]
        }
      },
      {
        "id": "bleeding",
        "text": "bleeding",
        "sym": "b",
        "color": "red",
        "condition": {
          "and": [
            { "u_has_effect": "bleed", "intensity": 11 },
            { "compare_num": [ { "u_val": "effect_intensity", "effect": "bleed" }, "<", { "const": 21 } ] }
          ]
        }
      },
      {
        "id": "bleeding",
        "text": "bleeding",
        "sym": "b",
        "color": "red_red",
        "condition": { "u_has_effect": "bleed", "intensity": 21 }
      }
    ]
  },
  {
    "id": "bodypart_status_text",
    "//": "Base widget for showing body part status; needs bodypart field defined in derived widget.",
    "type": "widget",
    "style": "text",
    "default_clause": { "text": "--" },
    "copy-from": "bodypart_status_indicator_template"
  },
  {
    "id": "bodypart_status_sym_text",
    "//": "Base widget for body part status symbols; needs bodypart field defined in derived widget.",
    "type": "widget",
    "style": "symbol",
    "text_align": "left",
    "copy-from": "bodypart_status_indicator_template"
  },
  {
    "id": "bp_status_head_text",
    "type": "widget",
    "label": "HEAD",
    "bodypart": "head",
    "copy-from": "bodypart_status_text"
  },
  {
    "id": "bp_status_torso_text",
    "type": "widget",
    "label": "TORSO",
    "bodypart": "torso",
    "copy-from": "bodypart_status_text"
  },
  {
    "id": "bp_status_left_arm_text",
    "type": "widget",
    "label": "L ARM",
    "bodypart": "arm_l",
    "copy-from": "bodypart_status_text"
  },
  {
    "id": "bp_status_right_arm_text",
    "type": "widget",
    "label": "R ARM",
    "bodypart": "arm_r",
    "copy-from": "bodypart_status_text"
  },
  {
    "id": "bp_status_left_leg_text",
    "type": "widget",
    "label": "L LEG",
    "bodypart": "leg_l",
    "copy-from": "bodypart_status_text"
  },
  {
    "id": "bp_status_right_leg_text",
    "type": "widget",
    "label": "R LEG",
    "bodypart": "leg_r",
    "copy-from": "bodypart_status_text"
  },
  {
    "id": "bp_status_sym_head_text",
    "type": "widget",
    "label": "HEAD",
    "bodypart": "head",
    "copy-from": "bodypart_status_sym_text"
  },
  {
    "id": "bp_status_sym_torso_text",
    "type": "widget",
    "label": "TORSO",
    "bodypart": "torso",
    "copy-from": "bodypart_status_sym_text"
  },
  {
    "id": "bp_status_sym_left_arm_text",
    "type": "widget",
    "label": "L ARM",
    "bodypart": "arm_l",
    "copy-from": "bodypart_status_sym_text"
  },
  {
    "id": "bp_status_sym_right_arm_text",
    "type": "widget",
    "label": "R ARM",
    "bodypart": "arm_r",
    "copy-from": "bodypart_status_sym_text"
  },
  {
    "id": "bp_status_sym_left_leg_text",
    "type": "widget",
    "label": "L LEG",
    "bodypart": "leg_l",
    "copy-from": "bodypart_status_sym_text"
  },
  {
    "id": "bp_status_sym_right_leg_text",
    "type": "widget",
    "label": "R LEG",
    "bodypart": "leg_r",
    "copy-from": "bodypart_status_sym_text"
  },
  {
    "id": "bp_status_legend_text",
    "type": "widget",
    "label": "Status Legend",
    "style": "legend",
    "bodyparts": [ "head", "torso", "arm_l", "arm_r", "leg_l", "leg_r" ],
    "copy-from": "bodypart_status_indicator_template",
    "width": 0,
    "height": 3,
    "text_align": "left",
    "flags": [ "W_LABEL_NONE", "W_DYNAMIC_HEIGHT" ]
  },
  {
    "id": "bodypart_status_top_layout",
    "type": "widget",
    "style": "layout",
    "arrange": "columns",
    "widgets": [ "bp_status_left_arm_text", "bp_status_head_text", "bp_status_right_arm_text" ]
  },
  {
    "id": "bodypart_status_bottom_layout",
    "type": "widget",
    "style": "layout",
    "arrange": "columns",
    "widgets": [ "bp_status_left_leg_text", "bp_status_torso_text", "bp_status_right_leg_text" ]
  },
  {
    "id": "bodypart_status_top_sym_layout",
    "type": "widget",
    "style": "layout",
    "arrange": "columns",
    "widgets": [ "bp_status_sym_left_arm_text", "bp_status_sym_head_text", "bp_status_sym_right_arm_text" ]
  },
  {
    "id": "bodypart_status_bottom_sym_layout",
    "type": "widget",
    "style": "layout",
    "arrange": "columns",
    "widgets": [ "bp_status_sym_left_leg_text", "bp_status_sym_torso_text", "bp_status_sym_right_leg_text" ]
  },
  {
    "id": "bodypart_status_layout",
    "type": "widget",
    "style": "layout",
    "label": "Body Part Status",
    "arrange": "rows",
    "widgets": [
      "bp_status_head_text",
      "bp_status_torso_text",
      "bp_status_left_arm_text",
      "bp_status_right_arm_text",
      "bp_status_left_leg_text",
      "bp_status_right_leg_text"
    ]
  },
  {
    "id": "bodypart_status_sym_layout",
    "type": "widget",
    "style": "layout",
    "label": "Body Part Status Alt",
    "arrange": "rows",
    "widgets": [ "bodypart_status_top_sym_layout", "bodypart_status_bottom_sym_layout", "bp_status_legend_text" ]
  }
]
