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

export const LecternRecipes = [
    {
        items: ["ns_rh:cursed_magatama", "ns_rh:fearful_scribblers", "none", "none"],
        result: {
            item: new ItemStack("ns_rh:fear", 1),
        },
    },
    {
        items: ["ns_rh:cursed_magatama", "ns_rh:hail_of_grace", "none", "none"],
        result: {
            item: new ItemStack("ns_rh:grace_period", 1),
        },
    },
    {
        items: ["ns_rh:cursed_magatama", "ns_rh:hemomancers_plea", "none", "none"],
        result: {
            item: new ItemStack("ns_rh:vampiric_mark", 1),
        },
    },
    {
        items: ["ns_rh:cursed_magatama", "ns_rh:madres_schematics", "none", "none"],
        result: {
            item: new ItemStack("ns_rh:summon_dolls", 1),
        },
    },
    {
        items: ["ns_rh:cursed_magatama", "ns_rh:golden_vow", "none", "none"],
        result: {
            item: new ItemStack("ns_rh:rejection", 1),
        },
    },
    {
        items: ["ns_rh:cursed_magatama", "ns_rh:grim_essence", "none", "none"],
        result: {
            item: new ItemStack("ns_rh:lich_spellbook", 1),
        },
    },
];

export const RecipeItems = new Map([
    [
        "ns_rh:cursed_magatama",
        {
            state: "ns_rh:item1",
            states: {
                "ns_rh:item1": "cursed_magatama",
            },
        },
    ],
    [
        "ns_rh:fearful_scribblers",
        {
            state: "ns_rh:item2",
            states: {
                "ns_rh:item2": "fearful_scribblers",
            },
        },
    ],
    [
        "ns_rh:golden_vow",
        {
            state: "ns_rh:item2",
            states: {
                "ns_rh:item2": "golden_vow",
            },
        },
    ],
    [
        "ns_rh:grim_essence",
        {
            state: "ns_rh:item2",
            states: {
                "ns_rh:item2": "grim_essence",
            },
        },
    ],
    [
        "ns_rh:hail_of_grace",
        {
            state: "ns_rh:item2",
            states: {
                "ns_rh:item2": "hail_of_grace",
            },
        },
    ],
    [
        "ns_rh:hemomancers_plea",
        {
            state: "ns_rh:item2",
            states: {
                "ns_rh:item2": "hemomancers_plea",
            },
        },
    ],
    [
        "ns_rh:madres_schematics",
        {
            state: "ns_rh:item2",
            states: {
                "ns_rh:item2": "madres_schematics",
            },
        },
    ],
]);

export const LecternStateToItem = new Map([
    [
        "none",
        {
            typeId: "none",
        },
    ],
    [
        "cursed_magatama",
        {
            typeId: "ns_rh:cursed_magatama",
        },
    ],
    [
        "fearful_scribblers",
        {
            typeId: "ns_rh:fearful_scribblers",
        },
    ],
    [
        "golden_vow",
        {
            typeId: "ns_rh:golden_vow",
        },
    ],
    [
        "grim_essence",
        {
            typeId: "ns_rh:grim_essence",
        },
    ],
    [
        "hail_of_grace",
        {
            typeId: "ns_rh:hail_of_grace",
        },
    ],
    [
        "hemomancers_plea",
        {
            typeId: "ns_rh:hemomancers_plea",
        },
    ],
    [
        "madres_schematics",
        {
            typeId: "ns_rh:madres_schematics",
        },
    ],
]);
