--// GUI Variables

local PlayerGUI = Player:WaitForChild("PlayerGui")
local MainUI = PlayerGUI:WaitForChild("MainUI") 
local PetUI = MainUI.PetsFrame
local MultiDeleteFrame = PetUI.MultiDeleteFrame

function UpdatePetsInMultiDelete(num)
	local amountofPets = tonumber(num) or #petsInMultiDelete 
	if type(tonumber(amountofPets)) == "number" then
		MultiDeleteFrame.PetsSelected.Text = tostring(amountofPets).." Pets Selected"
	end
end

function MultiDeleteModule:AddPetToMultiDelete(pet)
	if pet ~= nil then
		if not table.find(petsInMultiDelete, pet) then
			table.insert(petsInMultiDelete, pet)
			UpdatePetsInMultiDelete()
		end
	end
end

function MultiDeleteModule:DeletePetInMultiDelete(pet)
	if pet ~= nil then
		local place = table.find(petsInMultiDelete, pet)
		if place then
			table.remove(petsInMultiDelete, tonumber(place))
			UpdatePetsInMultiDelete()
		end
	end
end

function MultiDeleteModule:ResetMultiDeleteTable()
	petsInMultiDelete = {}
end

function MultiDeleteModule:GetMutliDeletePets()
	return petsInMultiDelete
end

return MultiDeleteModule
