import { EquipmentSlot } from "@minecraft/server";

export class allowedBlocksEnum {
    static AIR = "minecraft:air";
    static WATER = "minecraft:water";
}

// Freeze the entire class
Object.freeze(allowedBlocksEnum);

export const lightItemsData = [
    // Light Level 15
    {
        id: "minecraft:lantern",
        lightLevel: 15,
        equipmentSlots: [EquipmentSlot.Mainhand, EquipmentSlot.Offhand],
        allowedBlocks: [allowedBlocksEnum.AIR, allowedBlocksEnum.WATER],
        name: "tile.lantern.name",
    },
    {
        id: "squaredreams_realism:dynamic_torch.attachable",
        lightLevel: 15,
        equipmentSlots: [EquipmentSlot.Mainhand, EquipmentSlot.Offhand],
        allowedBlocks: [allowedBlocksEnum.AIR],
        name: "item.squaredreams_realism:dynamic_torch.attachable",
    },
    // Light Level 14
    {
        id: "minecraft:torch",
        lightLevel: 14,
        equipmentSlots: [EquipmentSlot.Mainhand, EquipmentSlot.Offhand],
        allowedBlocks: [allowedBlocksEnum.AIR],
        name: "tile.torch.name",
    },
    // Light Level 10
    {
        id: "minecraft:soul_lantern",
        lightLevel: 10,
        equipmentSlots: [EquipmentSlot.Mainhand, EquipmentSlot.Offhand],
        allowedBlocks: [allowedBlocksEnum.AIR],
        name: "tile.soul_lantern.name",
    },
    {
        id: "minecraft:soul_torch",
        lightLevel: 10,
        equipmentSlots: [EquipmentSlot.Mainhand, EquipmentSlot.Offhand],
        allowedBlocks: [allowedBlocksEnum.AIR],
        name: "tile.soul_torch.name",
    },
    // Light Level 7
    {
        id: "minecraft:redstone_torch",
        lightLevel: 7,
        equipmentSlots: [EquipmentSlot.Mainhand, EquipmentSlot.Offhand],
        allowedBlocks: [allowedBlocksEnum.AIR],
        name: "tile.redstone_torch.name",
    }
];