Module:Nav

local p = {} local rtable = require( 'Module:Table' )

local function link( value ) return ( value.dlc and mw.getCurrentFrame:expandTemplate{ title = 'Binding of Isaac Rebirth Wiki:Projects/Infobox/Dlc', params = { value.dlc } } or '' ) ..  .. value.n ..  end

local function img( value ) return ' ' end

function p.main( f ) local args = rtable.trimAll( rtable.getArgs( f.args ) ) local page = f:expandTemplate{ title = mw.title.getCurrentTitle, args = { 'data' } } local content = { c = { m = { i='Isaac_App.png|30px', n='Characters' }, n1 = { i='MainPageBosses.png|20px', n='Boss' }, n2 = { i='MainPageBabies.png|15px', n='Co-op' }, n3 = { i='Sister_Maggy_Icon.png|20px', n='Familiars' }, n4 = { i='MainPageMonsters.png|17px', n='Monsters' } }, i = { m = { i='Magic_Mushroom_Icon.png|30px', n='Items' }, n1 = { i='The_Left_Hand_Icon.png|18px', n='Trinkets' }, n2 = { i='TarotCard.png|20px', n='Cards & Runes', l='Cards and Runes' }, n3 = { i='Red_heart.png|18px', n='Pickups' }, n4 = { i='Lil\'_Chest_Icon.png|20px', n='Collection Page' } }, l = { m = { i='MainPageRooms.png|30px', n='Level Mechanics', l='Chapters' }, n1 = { i='MainPageChallenges.png|15px', n='Challenges' }, n2 = { i='HardIndicator.png|20px', n='Curses' }, n3 = { i='Greed_Mode_Indicator.png|20px', n='Gamemodes' }, n4 = { i='MainPageRooms.png|20px', n='Rooms' } }, m = { m = { i='MainPageMechanics.png|30px', n='Mechanics' }, n1 = { i='MainPageAttributes.png|20px', n='Attributes' }, n2 = { i='Isaac\'s_Tears_Icon.png|18px', n='Item Pools' }, n3 = { i='MainPageAchievements.png|20px', n='Achievements' }, n4 = { i='Guppy_App.png|17px', n='Transformations' } }, o = { m = { i='MainPageObjects.png|30px', n='Objects' }, n1 = { i='Slot_Machine.png|20px', n='Machines' }, n2 = { i='Shopkeeper.png|17px', n='Shopkeepers' }, n3 = { i='Beggar.png|20px', n='Beggars' }, n4 = { i='Metalblock.png|20px', n='Obstacles' } }, t = { m = { i='Humbling_Bundle_Icon.png|30px', n='Technical' }, n1 = { i='MainPageSeeds2.png|20px', n='Seeds' }, n2 = { i='Daily_Run_Indicator.png|20px', n='Daily Runs', l='Daily Challenges', dlc='a' }, n3 = { i='Missing_No._Icon.png|17px', n='Modding', dlc='a+' }, n4 = { i='The_Hourglass_Icon.png|17px', n='Version History' } } }	local master = args[1] or mw.text.split( page, 'ε' )[2] or 't'	local section = { main = content[master] } content[master] = nil local i = 1 for j, k in pairs( content ) do		section[i] = k		i = i + 1 end local nav = ' ' -- Add other nav here... --for m, n in pairs{ 'item', 'dice', 'locust', 'zodiac' } do		if args[n] or page:find( 'θ'.. n ) then			nav = nav .. f:expandTemplate{ title = 'Binding of Isaac Rebirth Wiki:Projects/Infobox/Nav/' .. n, args = { args[n] or mw.text.split( mw.text.split( page, 'θ' .. n .. ':' )[2], 'θ' )[1] } }		end	end nav = nav .. ' '	return nav end

return p