local _, core = ...;

core.DB_Collections = {
	[1] = core.DBmounts,
	[2] = core.DBpets,
	[3] = core.DBtransmog,
};

core.DB_DisplayCollections = {{16,15,14,13,12,11,9,2,4,5,6,1,7,3,8,10},{11,1,3,4,5,7,10,2,6,8,12,9},{6,1,2,3,4,5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}}

local function loadDB_Collections(idTab)
	if (idTab == 1) then
		core.Loadmounts()
		core.DB_Collections[idTab] = core.DBmounts;
	elseif (idTab == 2) then
		C_PetJournal.ClearSearchFilter();
		C_PetJournal.SetFilterChecked(LE_PET_JOURNAL_FILTER_COLLECTED, true)
		C_PetJournal.SetFilterChecked(LE_PET_JOURNAL_FILTER_NOT_COLLECTED, true)
		C_PetJournal.SetAllPetTypesChecked(true)
		C_PetJournal.SetAllPetSourcesChecked(true)
		core.LoadPets()
		core.DB_Collections[idTab] = core.DBpets;
	elseif (idTab == 3) then
		core.LoadTransmog()
		core.DB_Collections[idTab] = core.DBtransmog;
	end
end
core.loadDB_Collections = loadDB_Collections;