{
    "namespace": "quest_tabs",
    "quest_tab_state_panel": {
        "type": "panel",
        "anchor_to": "center",
        "anchor_from": "center",
        "layer": 1,
        "size": [
            "100%",
            "100%"
        ],
        "$button_alpha|default": 1,
        "$content_alpha|default": 1,
        "$button_image|default": "common_buttons.button_image",
        "$button_icon|default": "quest_book_utils.button_icon",
        "controls": [
            {
                "button_image@$button_image": {
                    "type": "image",
                    "anchor_to": "center",
                    "anchor_from": "center",
                    "size": [
                        "100%",
                        "100%"
                    ]
                }
            },
            {
                "button_icon@$button_icon": {
                    "layer": 2
                }
            }
        ]
    },
    "tab_button_common@common_buttons.light_text_button": {
        "collection_index": "$button_index",

        "layer": 1,
        "$button_state_panel": "quest_tabs.quest_tab_state_panel",
        "$pressed_button_name": "button.form_button_click",

        "$default_button_texture": "textures/ui/TabTopBack",
        "$hover_button_texture": "textures/ui/TabTopBackHover",
        "$pressed_button_texture": "textures/ui/TabTopBackHover",
        "$locked_button_texture": "textures/ui/TabTopFront",

        "variables": [
            {
                "requires": "$is_left_most_tab",
                "$default_button_texture": "textures/ui/TabTopBackLeftMost",
                "$hover_button_texture": "textures/ui/TabTopBackLeftMostHover",
                "$pressed_button_texture": "textures/ui/TabTopBackLeftMostHover",
                "$locked_button_texture": "textures/ui/TabTopFrontLeftMost"
            }
        ],

        "size": [
            28,
            28
        ],
        "$focus_border_size": [
            0,
            0
        ],
        "$button_image_size": [
            "100%",
            "100%"
        ]
    },
    "tab_button": {
        "type": "stack_panel",
        "orientation": "horizontal",
        "collection_name": "form_buttons",
        "size": [
            "100%c",
            "100%c"
        ],
        "controls": [
            {
                "normal_tab_button@tab_button_common": {
                    "$is_left_most_tab|default": false,
                    "bindings": [
                        {
                            "binding_type": "collection_details",
                            "binding_collection_name": "form_buttons"
                        },
                        {
                            "binding_name": "#form_button_text",
                            "binding_type": "collection",
                            "binding_collection_name": "form_buttons"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(#form_button_text - 'beginnerQuests' - 'intermediateQuests' - 'advancedQuests' - 'expertQuests' - 'masteryQuests' - '.')",
                            "target_property_name": "#is_locked"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(not (#is_locked = 'locked'))",
                            "target_property_name": "#visible"
                        }
                    ]
                }
            },
            {
                "locked_tab_button@tab_button_common": {
                    "$is_left_most_tab|default": false,
                    "enabled": false,
                    "bindings": [
                        {
                            "binding_type": "collection_details",
                            "binding_collection_name": "form_buttons"
                        },
                        {
                            "binding_name": "#form_button_text",
                            "binding_type": "collection",
                            "binding_collection_name": "form_buttons"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(#form_button_text - 'beginnerQuests' - 'intermediateQuests' - 'advancedQuests' - 'expertQuests' - 'masteryQuests' - '.')",
                            "target_property_name": "#is_locked"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(#is_locked = 'locked')",
                            "target_property_name": "#visible"
                        }
                    ]
                }
            }
        ]
    }
}