{
    "format_version": "1.17",
    "minecraft:npc_dialogue": {
        "scenes": [
            {
                "scene_tag": "cc:err_not_qualified",
                "npc_name": "Error: Not Qualified",
                "text": "This bot does not meet the qualifications to perform this action.\n\n§c§o cc:err_not_qualified",
                "on_close_commands": [
                    "/function cc/close_bot_menu"
                ],
                "on_open_commands": [
                    "/function cc/open_bot_menu"
                ],
                "buttons": [
                    {
                        "name": "Ok",
                        "commands": [
                            "/event entity @e[tag=cc:bot,c=1] cc:open_menu"
                        ]
                    }
                ]
            },
            {
                "scene_tag": "cc:err_no_charging_station",
                "npc_name": "Error: No Charging Station",
                "text": "No charging station within simulated distance was found.\n\n§c§o cc:err_no_charging_station",
                "on_close_commands": [
                    "/function cc/close_bot_menu"
                ],
                "on_open_commands": [
                    "/function cc/open_bot_menu"
                ],
                "buttons": [
                    {
                        "name": "Ok",
                        "commands": [
                            "/event entity @e[tag=cc:bot,c=1] cc:open_menu"
                        ]
                    }
                ]
            },
            {
                "scene_tag": "cc:err_no_bot_hopper",
                "npc_name": "Error: No Bot Hopper",
                "text": "No bot hopper within simulated distance was found.\n\n§c§o cc:err_no_bot_hopper",
                "on_close_commands": [
                    "/function cc/close_bot_menu"
                ],
                "on_open_commands": [
                    "/function cc/open_bot_menu"
                ],
                "buttons": [
                    {
                        "name": "Ok",
                        "commands": [
                            "/event entity @e[tag=cc:bot,c=1] cc:open_menu"
                        ]
                    }
                ]
            },
            {
                "scene_tag": "cc:notice_return_to_charge",
                "npc_name": "Notice: Return to Charge",
                "text": "This will pause all bot programs and return it to the nearest charging station. Are you sure you would like to continue? (this will not work if the bot is at full power)",
                "on_close_commands": [
                    "/function cc/close_bot_menu"
                ],
                "on_open_commands": [
                    "/function cc/open_bot_menu"
                ],
                "buttons": [
                    {
                        "name": "Yes",
                        "commands": [
                            "/execute @e[type=cc:bot_charger,c=1] ~~~ tag @e[type=cc:bot_menu] add valid",
                            "/dialogue open @s[tag=!valid] @initiator cc:err_no_charging_station",
                            "/execute @s[tag=valid] ~~~ event entity @e[tag=cc:bot,c=1] cc:return_to_charge",
                            "/tag @s remove valid"
                        ]
                    },
                    {
                        "name": "Cancel",
                        "commands": [
                            "/event entity @e[tag=cc:bot,c=1] cc:open_menu"
                        ]
                    }
                ]
            }
        ]
    }
}