import { ActionFormData } from "@minecraft/server-ui";
import { guideMainView } from "./guideMainView";
import { guideViewComponet, guideViewComponetWithButton } from "./components";

export const guideBlockView = (player) => {
    const actionForm = new ActionFormData();
    actionForm.title("view.title.guide.block")//Bloques
    actionForm.body("view.description.guide.block")//Categorías de bloques
    actionForm.button("view.title.guide.block.connectors", "textures/nps/ec/blocks/cable_on")//Conectores
    actionForm.button("view.title.guide.block.generators", "textures/nps/ec/blocks/furnace_energy_off")//Generadores
    actionForm.button("view.title.guide.block.interactors", "textures/nps/ec/blocks/connector_off")//Interactores
    actionForm.button("view.title.guide.block.batteries", "textures/nps/ec/blocks/battery/battery_charge_0")//Baterías
    actionForm.button("view.title.guide.block.tables", "textures/nps/ec/blocks/digital_table_front_off")//Mesas y Procesadores
    actionForm.button("view.title.guide.block.actuators", "textures/nps/ec/blocks/digital_tnt_side_off")//Actuadores
    actionForm.button("view.guide.uncategory", "textures/nps/ec/blocks/digital_trapdoor_off")//Sin categoría
    actionForm.button("view.button_return");//Regresar

    actionForm.show(player).then((data) => {
        if (data.canceled) return;
        if (data.selection == 0) {
            guideBlockConnectorsView(player);
        } else if (data.selection == 1) {
            guideBlockGeneratorsView(player);
        } else if (data.selection == 2) {
            guideBlockInteractorsView(player);
        } else if (data.selection == 3) {
            guideViewComponet(player, "tile.nps_ec:battery.name", {
                rawtext: [
                    { translate: "view.batteries.battery.1" },
                    { translate: "view.batteries.battery.2" },
                    { translate: "view.batteries.battery.3" },
                    { translate: "view.batteries.battery.4" },
                    { translate: "view.batteries.battery.5" },
                    { translate: "view.batteries.battery.6" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockView, "textures/nps/ec/recipes/battery");
        } else if (data.selection == 4) {
            guideBlockTablesView(player);
        } else if (data.selection == 5) {
            guideBlockActuatorsView(player);
        } else if (data.selection == 6) {
            guideBlockNoCategoryView(player);
        } else {
            guideMainView(player);
        }
    })
}

const guideBlockConnectorsView = (player) => {
    const actionForm = new ActionFormData();
    actionForm.title("view.title.guide.block.connectors")//Conectores
    actionForm.body("view.description.guide.block.connectors")//Descripción de conectores
    actionForm.button("tile.nps_ec:cable.name")//Cable
    actionForm.button("tile.nps_ec:reinforced_cable.name")//Reinforced Cable
    actionForm.button("tile.nps_ec:repeater.name")//Repeater
    actionForm.button("view.button_return");//Regresar

    actionForm.show(player).then((data) => {
        if (data.canceled) return;
        if (data.selection == 0) {
            guideViewComponet(player, "tile.nps_ec:cable.name", {
                rawtext: [
                    { translate: "view.connectors.cable.1" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockConnectorsView, "textures/nps/ec/recipes/cable");
        } else if (data.selection == 1) {
            guideViewComponet(player, "tile.nps_ec:reinforced_cable.name", {
                rawtext: [
                    { translate: "view.connectors.reinforced_cable.1" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockConnectorsView, "textures/nps/ec/recipes/reinforced_cable");
        } else if (data.selection == 2) {
            guideViewComponet(player, "tile.nps_ec:repeater.name", {
                rawtext: [
                    { translate: "view.connectors.repeater.1", with: { rawtext: [{ translate: "tile.nps_ec:cable.name" }, { translate: "tile.nps_ec:reinforced_cable.name" }] } },
                    { translate: "view.connectors.repeater.2", with: { rawtext: [{ translate: "tile.nps_ec:cable.name" }, { translate: "tile.nps_ec:reinforced_cable.name" }] } },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockConnectorsView, "textures/nps/ec/recipes/repeater");
        } else {
            guideBlockView(player);
        }
    })
}


const guideBlockGeneratorsView = (player) => {
    const actionForm = new ActionFormData();
    actionForm.title("view.title.guide.block.generators")//Generadores
    actionForm.body("view.description.guide.block.generators")//Descripción de generadores
    actionForm.button("tile.nps_ec:furnace_energy.name")//Furnace Energy
    actionForm.button("tile.nps_ec:waterwheel.name")//Waterwheel
    actionForm.button("tile.nps_ec:clock_panel.name")//Clock Panel
    actionForm.button("view.button_return");//Regresar

    actionForm.show(player).then((data) => {
        if (data.canceled) return;
        if (data.selection == 0) {
            guideViewComponet(player, "tile.nps_ec:furnace_energy.name", {
                rawtext: [
                    { translate: "view.generators.furnace_energy.1" },
                    { translate: "view.generators.furnace_energy.2", with: { rawtext: [{ translate: "tile.nps_ec:furnace_energy.name" }] } },
                    { translate: "view.generators.furnace_energy.3" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockGeneratorsView, "textures/nps/ec/recipes/furnace_energy");
        } else if (data.selection == 1) {
            guideViewComponet(player, "tile.nps_ec:waterwheel.name", {
                rawtext: [
                    { translate: "view.generators.waterwheel.1" },
                    { translate: "view.generators.waterwheel.2" },
                    { translate: "view.generators.waterwheel.3" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockGeneratorsView, "textures/nps/ec/recipes/waterwheel");
        } else if (data.selection == 2) {
            guideViewComponet(player, "tile.nps_ec:clock_panel.name", {
                rawtext: [
                    { translate: "view.generators.clock_panel.1" },
                    { translate: "view.generators.clock_panel.2" },
                    { translate: "view.generators.clock_panel.3" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockGeneratorsView, "textures/nps/ec/recipes/clock_panel");
        } else {
            guideBlockView(player);
        }
    })
}

const guideBlockInteractorsView = (player) => {
    const actionForm = new ActionFormData();
    actionForm.title("view.title.guide.block.interactors")//Interactores
    actionForm.body("view.description.guide.block.interactors")//Descripción de interactores
    actionForm.button("tile.nps_ec:connector.name")//Connector
    actionForm.button("tile.nps_ec:mob_sensor.name")//Mob Sensor
    actionForm.button("view.button_return");//Regresar

    actionForm.show(player).then((data) => {
        if (data.canceled) return;
        if (data.selection == 0) {
            guideViewComponetWithButton(player, "tile.nps_ec:connector.name", {
                rawtext: [
                    { translate: "view.interactors.connector.1" },
                    { translate: "view.make.crafting_table" }
                ]
            },
            {
                rawtext: [
                    { translate: "view.title.guide.complements" }
                ]
            }, guideComplementsView, guideBlockInteractorsView, null, "textures/nps/ec/recipes/connector");
        } else if (data.selection == 1) {
            guideViewComponet(player, "tile.nps_ec:mob_sensor.name", {
                rawtext: [
                    { translate: "view.interactors.mob_sensor.1" },
                    { translate: "view.interactors.mob_sensor.2" },
                    { translate: "view.interactors.mob_sensor.3" },
                    { translate: "view.interactors.mob_sensor.4" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockInteractorsView, "textures/nps/ec/recipes/mob_sensor");
        } else {
            guideBlockView(player);
        }
    })
}

const guideComplementsView = (player) => {
    const actionForm = new ActionFormData();
    actionForm.title("view.title.guide.complements")//Bloques complementarios
    actionForm.body("view.description.guide.complements")//Descripción de los complementos del conector
    actionForm.button("tile.nps_ec:circuit_breaker.name")//Circuit Breaker
    actionForm.button("tile.nps_ec:iron_button.name")//Iron Button
    actionForm.button("view.pressure_plate")//Any Pressure Plate
    actionForm.button("view.button_return");//Regresar

    actionForm.show(player).then((data) => {
        if (data.canceled) return;
        if (data.selection == 0) {
            guideViewComponet(player, "tile.nps_ec:circuit_breaker.name", {
                rawtext: [
                    { translate: "view.interactors.circuit_breaker.1" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideComplementsView, "textures/nps/ec/recipes/circuit_breaker");
        } else if (data.selection == 1) {
            guideViewComponet(player, "tile.nps_ec:iron_button.name", {
                rawtext: [
                    { translate: "view.interactors.iron_button.1" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideComplementsView, "textures/nps/ec/recipes/iron_button");
        } else if (data.selection == 2) {
            guideViewComponet(player, "view.pressure_plate", {
                rawtext: [
                    { translate: "view.interactors.pressure_plate.1" }
                ]
            }, guideComplementsView);
        } else {
            guideBlockInteractorsView(player);
        }
    })
}

const guideBlockTablesView = (player) => {
    const actionForm = new ActionFormData();
    actionForm.title("view.title.guide.block.tables")//Mesas y Procesadores
    actionForm.body("view.description.guide.block.tables")//Descripción de mesas y procesadores
    actionForm.button("tile.nps_ec:battery_charger.name")//Battery Charger
    actionForm.button("tile.nps_ec:digital_table.name")//Digital Table
    actionForm.button("tile.nps_ec:plasma_reloader.name")//Plasma Reloader
    actionForm.button("tile.nps_ec:destruction_table.name")//Destruction Table
    actionForm.button("tile.nps_ec:weather_control.name")//Weather Control
    actionForm.button("tile.nps_ec:teleport.name")//Teleport
    actionForm.button("view.button_return");//Regresar

    actionForm.show(player).then((data) => {
        if (data.canceled) return;
        if (data.selection == 0) {
            guideViewComponet(player, "tile.nps_ec:battery_charger.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure" },
                    { translate: "view.tables.battery_charger.1" },
                    { translate: "view.works_as_crafting_table" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockTablesView, "textures/nps/ec/recipes/battery_charger");
        } else if (data.selection == 1) {
            guideViewComponet(player, "tile.nps_ec:digital_table.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure" },
                    { translate: "view.tables.digital_table.1" },
                    { translate: "view.works_as_crafting_table" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockTablesView, "textures/nps/ec/recipes/digital_table");
        } else if (data.selection == 2) {
            guideViewComponet(player, "tile.nps_ec:plasma_reloader.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure" },
                    { translate: "view.tables.plasma_reloader.1" },
                    { translate: "view.works_as_crafting_table" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockTablesView, "textures/nps/ec/recipes/plasma_reloader");
        } else if (data.selection == 3) {
            guideViewComponet(player, "tile.nps_ec:destruction_table.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure" },
                    { translate: "view.tables.destruction_table.1" },
                    { translate: "view.works_as_crafting_table" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockTablesView, "textures/nps/ec/recipes/destruction_table");
        } else if (data.selection == 4) {
            guideViewComponet(player, "tile.nps_ec:weather_control.name", {
                rawtext: [
                    { translate: "view.tables.weather_control.1" },
                    { translate: "view.tables.weather_control.2" },
                    { translate: "view.tables.weather_control.3" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockTablesView, "textures/nps/ec/recipes/weather_control");
        } else if (data.selection == 5) {
            guideViewComponet(player, "tile.nps_ec:teleport.name", {
                rawtext: [
                    { translate: "view.powered_by.pure" },
                    { translate: "view.tables.teleport.1" },
                    { translate: "view.tables.teleport.2" },
                    { translate: "view.tables.teleport.3" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockTablesView, "textures/nps/ec/recipes/teleport");
        } else {
            guideBlockView(player);
        }
    })
}

const guideBlockActuatorsView = (player) => {
    const actionForm = new ActionFormData();
    actionForm.title("view.title.guide.block.actuators")//Actuadores
    actionForm.body("view.description.guide.block.actuators")//Descripción de actuadores
    actionForm.button("tile.nps_ec:analyzer.name")//Analyzer
    actionForm.button("tile.nps_ec:receiver.name")//Receiver
    actionForm.button("tile.nps_ec:plasma_bridge_receiver.name")//Plasma Bridge Receiver
    actionForm.button("tile.nps_ec:digital_tnt.name")//Digital TNT
    actionForm.button("tile.nps_ec:fluid_converter.name")//Liquid Solidifier
    actionForm.button("tile.nps_ec:farmer.name")//Farmer
    actionForm.button("tile.nps_ec:item_transfer_node.name")//Item Transfer Node
    actionForm.button("tile.nps_ec:resource_recycler.name")//Resource Recycler
    actionForm.button("tile.nps_ec:copper_mob_spawner.name")//Copper Mob Spawner
    actionForm.button("view.button_return");//Regresar

    actionForm.show(player).then((data) => {
        if (data.canceled) return;
        if (data.selection == 0) {
            guideViewComponetWithButton(player, "tile.nps_ec:analyzer.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure_up_down" },
                    { translate: "view.actuators.analyzer.1" },
                    { translate: "view.actuators.analyzer.2" },
                    { translate: "view.actuators.analyzer.3" },
                    { translate: "view.make.crafting_table" }
                ]
            }, {
                rawtext: [
                    { translate: "view.actuators.analyzer.4" }
                ]
            }, guideDigitalMobsView, guideBlockActuatorsView, null, "textures/nps/ec/recipes/analyzer");
        } else if (data.selection == 1) {
            guideViewComponet(player, "tile.nps_ec:receiver.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure" },
                    { translate: "view.actuators.receiver.1" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockActuatorsView, "textures/nps/ec/recipes/receiver");
        } else if (data.selection == 2) {
            guideViewComponet(player, "tile.nps_ec:plasma_bridge_receiver.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure" },
                    { translate: "view.actuators.plasma_bridge_receiver.1" },
                    { translate: "view.actuators.plasma_bridge_receiver.2" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockActuatorsView, "textures/nps/ec/recipes/plasma_bridge_receiver");
        } else if (data.selection == 3) {
            guideViewComponet(player, "tile.nps_ec:digital_tnt.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure" },
                    { translate: "view.actuators.digital_tnt.1" },
                    { translate: "view.make.digital_table" }
                ]
            }, guideBlockActuatorsView, "textures/nps/ec/recipes/digital_tnt");
        } else if (data.selection == 4) {
            guideViewComponet(player, "tile.nps_ec:fluid_converter.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure" },
                    { translate: "view.actuators.fluid_converter.1" },
                    { translate: "view.actuators.fluid_converter.2" },
                    { translate: "%%s -> %%s\n", with: { rawtext: [{ translate: "tile.water.name" }, { translate: "tile.slime.name" }] } },
                    { translate: "%%s -> %%s\n", with: { rawtext: [{ translate: "tile.flowing_lava.name" }, { translate: "tile.magma.name" }] } },
                    { translate: "%%s -> %%s\n\n", with: { rawtext: [{ translate: "item.milk.name" }, { translate: "tile.bone_block.name" }] } },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockActuatorsView, "textures/nps/ec/recipes/fluid_converter");
        } else if (data.selection == 5) {
            guideViewComponet(player, "tile.nps_ec:farmer.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure_up_down" },
                    { translate: "view.actuators.farmer.1" },
                    { translate: "view.actuators.farmer.2" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockActuatorsView, "textures/nps/ec/recipes/farmer");
        } else if (data.selection == 6) {
            guideViewComponet(player, "tile.nps_ec:item_transfer_node.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure" },
                    { translate: "view.actuators.item_transfer_node.1" },
                    { translate: "view.actuators.item_transfer_node.2" },
                    { translate: "view.actuators.item_transfer_node.3" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockActuatorsView, "textures/nps/ec/recipes/item_transfer_node");
        } else if (data.selection == 7) {
            guideViewComponet(player, "tile.nps_ec:resource_recycler.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure_up_down" },
                    { translate: "view.actuators.resource_recycler.1" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockActuatorsView, "textures/nps/ec/recipes/resource_recycler");
        } else if (data.selection == 8) {
            guideViewComponet(player, "tile.nps_ec:copper_mob_spawner.name", {
                rawtext: [
                    { translate: "view.powered_by.pure_not_pure" },
                    { translate: "view.actuators.copper_mob_spawner.1" },
                    { translate: "%%s -> %%s\n", with: { rawtext: [{ translate: "entity.chicken.name" }, { translate: "item.chicken.name" }] } },
                    { translate: "%%s -> %%s\n", with: { rawtext: [{ translate: "entity.cow.name" }, { translate: "item.beef.name" }] } },
                    { translate: "%%s -> %%s\n", with: { rawtext: [{ translate: "entity.creeper.name" }, { translate: "item.gunpowder.name" }] } },
                    { translate: "%%s -> %%s\n", with: { rawtext: [{ translate: "entity.pig.name" }, { translate: "item.porkchop.name" }] } },
                    { translate: "%%s -> %%s\n", with: { rawtext: [{ translate: "entity.sheep.name" }, { translate: "item.muttonRaw.name" }] } },
                    { translate: "%%s -> %%s\n", with: { rawtext: [{ translate: "entity.skeleton.name" }, { translate: "item.bone.name" }] } },
                    { translate: "%%s -> %%s\n\n", with: { rawtext: [{ translate: "entity.zombie.name" }, { translate: "item.rotten_flesh.name" }] } },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockActuatorsView, "textures/nps/ec/recipes/copper_mob_spawner");
        }
        else {
            guideBlockView(player);
        }
    })
}


const guideDigitalMobsView = (player) => {
    const actionForm = new ActionFormData();
    actionForm.title("view.actuators.analyzer.3")//Mobs Digitales
    actionForm.body("view.description.guide.digital_mobs")//Descripción de mobs digitales
    actionForm.button("entity.nps_ec:digital_cat.name")//Digital Cat
    actionForm.button("entity.nps_ec:digital_cow.name")//Digital Cow
    actionForm.button("entity.nps_ec:digital_iron_golem.name")//Digital Iron Golem
    actionForm.button("entity.nps_ec:digital_sheep.name")//Digital Sheep
    actionForm.button("entity.nps_ec:digital_skeleton.name")//Digital Skeleton
    actionForm.button("entity.nps_ec:digital_wolf.name")//Digital Wolf
    actionForm.button("entity.nps_ec:digital_zombie.name")//Digital Zombie
    actionForm.button("view.button_return");//Regresar

    actionForm.show(player).then((data) => {
        if (data.canceled) return;
        if (data.selection == 0) {
            guideViewComponet(player, "entity.nps_ec:digital_cat.name", {
                rawtext: [
                    { translate: "view.digital_mob.digital_cat" }
                ]
            }, guideDigitalMobsView);
        } else if (data.selection == 1) {
            guideViewComponet(player, "entity.nps_ec:digital_cow.name", {
                rawtext: [
                    { translate: "view.digital_mob.digital_cow" }
                ]
            }, guideDigitalMobsView);
        } else if (data.selection == 2) {
            guideViewComponet(player, "entity.nps_ec:digital_iron_golem.name", {
                rawtext: [
                    { translate: "view.digital_mob.digital_iron_golem" }
                ]
            }, guideDigitalMobsView);
        } else if (data.selection == 3) {
            guideViewComponet(player, "entity.nps_ec:digital_sheep.name", {
                rawtext: [
                    { translate: "view.digital_mob.digital_sheep" }
                ]
            }, guideDigitalMobsView);
        }
        else if (data.selection == 4) {
            guideViewComponet(player, "entity.nps_ec:digital_skeleton.name", {
                rawtext: [
                    { translate: "view.digital_mob.digital_skeleton" }
                ]
            }, guideDigitalMobsView);
        } else if (data.selection == 5) {
            guideViewComponet(player, "entity.nps_ec:digital_wolf.name", {
                rawtext: [
                    { translate: "view.digital_mob.digital_wolf" }
                ]
            }, guideDigitalMobsView);
        } else if (data.selection == 6) {
            guideViewComponet(player, "entity.nps_ec:digital_zombie.name", {
                rawtext: [
                    { translate: "view.digital_mob.digital_zombie" }
                ]
            }, guideDigitalMobsView);
        } else {
            guideBlockActuatorsView(player);
        }
    })
}


const guideBlockNoCategoryView = (player) => {
    const actionForm = new ActionFormData();
    actionForm.title("view.guide.uncategory")//Sin categoría
    actionForm.body("view.description.guide.no_category")//Descripción de sin categoría
    actionForm.button("tile.nps_ec:teleport_checkpoint.name")//Teleport Checkpoint
    actionForm.button("tile.nps_ec:digital_trapdoor.name")//Digital Trapdoor
    actionForm.button("tile.nps_ec:digital_door.name")//Digital Door
    actionForm.button("tile.nps_ec:digital_block.name")//Digital Block
    actionForm.button("tile.nps_ec:charged_amethyst_block.name")//Charged Amethyst Block
    actionForm.button("tile.nps_ec:budding_charged_amethyst.name")//Budding Charged Amethyst
    actionForm.button("tile.nps_ec:drop_box.name")//Drop Box
    actionForm.button("view.button_return");//Regresar

    actionForm.show(player).then((data) => {
        if (data.canceled) return;
        if (data.selection == 0) {
            guideViewComponet(player, "tile.nps_ec:teleport_checkpoint.name", {
                rawtext: [
                    { translate: "view.not_category.teleport_checkpoint.1" },
                    { translate: "view.not_category.teleport_checkpoint.2" },
                    { translate: "view.make.crafting_table" }
                ]
            }, guideBlockNoCategoryView, "textures/nps/ec/recipes/teleport_checkpoint");
        } else if (data.selection == 1) {
            guideViewComponet(player, "tile.nps_ec:digital_trapdoor.name", {
                rawtext: [
                    { translate: "view.not_category.digital_trapdoor.1" },
                    { translate: "view.not_category.digital_trapdoor.2" },
                    { translate: "view.make.digital_table" }
                ]
            }, guideBlockNoCategoryView, "textures/nps/ec/recipes/digital_trapdoor");
        } else if (data.selection == 2) {
            guideViewComponet(player, "tile.nps_ec:digital_door.name", {
                rawtext: [
                    { translate: "view.not_category.digital_door.1" },
                    { translate: "view.not_category.digital_door.2" },
                    { translate: "view.make.digital_table" }
                ]
            }, guideBlockNoCategoryView, "textures/nps/ec/recipes/digital_door");
        } else if (data.selection == 3) {
            guideViewComponet(player, "tile.nps_ec:digital_block.name", {
                rawtext: [
                    { translate: "view.not_category.digital_block.1" }
                ]
            }, guideBlockNoCategoryView);
        } else if (data.selection == 4) {
            guideViewComponet(player, "tile.nps_ec:charged_amethyst_block.name", {
                rawtext: [
                    { translate: "view.not_need_power" },
                    { translate: "view.not_category.charged_amethyst_block.1" }
                ]
            }, guideBlockNoCategoryView);
        } else if (data.selection == 5) {
            guideViewComponet(player, "tile.nps_ec:budding_charged_amethyst.name", {
                rawtext: [
                    { translate: "view.not_need_power" },
                    { translate: "view.not_category.budding_charged_amethyst.1" },
                    { translate: "view.not_category.budding_charged_amethyst.2" }
                ]
            }, guideBlockNoCategoryView);
        } else if (data.selection == 6) {
            guideViewComponet(player, "tile.nps_ec:drop_box.name", {
                rawtext: [
                    { translate: "view.not_category.drop_box.1" }
                ]
            }, guideBlockNoCategoryView);
        } else {
            guideBlockView(player);
        }
    })
}