-- ProfessionGuides/Blacksmithing/Pandaria_Blacksmithing.lua
local PT = AhUI
if not PT then return end
local G = PT.ProfessionGuides

G.guides.PANDARIA = G.guides.PANDARIA or {}

G.guides.PANDARIA.BLACKSMITHING = {
    profession  = "Blacksmithing",
    skillLineID = 2473, -- Pandaria Blacksmithing
    nameKey = "PG_GUIDE_PANDARIA_BLACKSMITHING_NAME",


    -- =========================
    -- TRAINER
    -- =========================
    trainers = {
        alliance = {
            {
                npcID = 64085, -- Cullen Hammerbrow
                name  = "Cullen Hammerbrow",
                mapID = 1530, -- Vale of Eternal Blossoms
                x = 91.2,
                y = 65.6,
            },
        },
        horde = {
            {
                npcID = 64058, -- Jorunga Stonehoof
                name  = "Jorunga Stonehoof",
                mapID = 1530,
                x = 59.2,
                y = 11.8,
            },
        },
    },

    -- =========================
    -- VENDORS (Spirit of Harmony recipes)
    -- =========================
    vendors = {
        alliance = {
            {
                npcID = 64085, -- Cullen Hammerbrow
                name  = "Cullen Hammerbrow",
                mapID = 1530, -- Vale of Eternal Blossoms
                x = 91.2,
                y = 65.6,
                sells = {
                    { itemID = 82948 }, -- Contender’s Revenant Bracers (recipe)
                },
            },
        },
        horde = {
            {
                npcID = 64058, -- Jorunga Stonehoof
                name  = "Jorunga Stonehoof",
                mapID = 1530,
                x = 59.2,
                y = 11.8,
                sells = {
                    { itemID = 82948 }, -- Contender’s Revenant Bracers (recipe)
                },
            },
        },
    },

    steps = {

        -- 1–5 : 5x Ghostly Skeleton Key
        {
            min = 1,
            max = 5,
            recipes = {
                {
                    spellID = 122633, -- Ghostly Skeleton Key
                    crafts  = 5,
                    autoReagents = true,
                },
            },
        },

        -- 5–15 : 10x Ghost-Forged Gauntlets
        {
            min = 5,
            max = 15,
            recipes = {
                {
                    spellID = 122579, -- Ghost-Forged Gauntlets
                    crafts  = 10,
                    autoReagents = true,
                },
            },
        },

        -- 15–30 : 15x Ghost-Forged Shoulders
        {
            min = 15,
            max = 30,
            recipes = {
                {
                    spellID = 122577, -- Ghost-Forged Shoulders
                    crafts  = 15,
                    autoReagents = true,
                },
            },
        },

        -- 30–35 : 5x Living Steel Weapon Chain
        {
            min = 30,
            max = 35,
            recipes = {
                {
                    spellID = 122636, -- Living Steel Weapon Chain
                    crafts  = 5,
                    autoReagents = true,
                },
            },
        },

        -- 35–50 : 20x Ghost-Forged Legplates
        {
            min = 35,
            max = 50,
            recipes = {
                {
                    spellID = 122576, -- Ghost-Forged Legplates
                    crafts  = 15,
                    autoReagents = true,
                },
            },
        },

        -- 50 : покупка рецепта за Spirit of Harmony
		{
			min = 50,
			max = 50,

			recipes = {
				{
					crafts = 1,
					reagents = {
						{ itemID = 76061, count = 1 }, -- Spirit of Harmony
					},
				},
			},

			disablesCraft = true,
			disablesCraftAll = true,

			noteKey = "PG_GUIDE_PANDARIA_BLACKSMITHING_NOTE_1",
		},

        -- 50–60 : 10x Contender’s Revenant Bracers
		{
			min = 50,
			max = 60,

			recipes = {
				{
					spellID = 122621, -- Contender’s Revenant Bracers
					crafts  = 10,
					autoReagents = true,

					requires = {
						{
							type   = "recipe_item",
							itemID = 84160, -- Plans: Contender’s Revenant Bracers
						},
					},
				},
			},

			noteKey = "PG_GUIDE_PANDARIA_BLACKSMITHING_NOTE_2",
		},

        -- 60–75 : 15x Contender’s Revenant Bracers
        {
            min = 60,
            max = 75,
            recipes = {
                {
                    spellID = 122582, -- Contender’s Revenant Bracers
                    crafts  = 15,
                    autoReagents = true,
                },
            },
            disablesShopping = true,
            noteKey = "PG_GUIDE_PANDARIA_BLACKSMITHING_NOTE_3",
        },
    },
}
