WhatsNext:AddConditionalStatement("Have Pet",{
	category = "Pets",
	test = function(checkTable) 
		return select(2,HasPetSpells())
	end,
	text = function(checkTable) 
		return "player has a pet out."
	end,
	arguments = {}
})

WhatsNext:AddConditionalStatement("Pet Attacking",{
	category = "Pets",
	test = function(checkTable) 
		return IsPetAttackActive()
	end,
	text = function(checkTable) 
		return "player's pet is attacking."
	end,
	arguments = {}
})

WhatsNext:AddConditionalStatement("Pet Spell Autocasting",{
	category = "Pets",
	test = function(checkTable) 
		return select(2,GetSpellAutocast(WhatsNext:GetSpellName(checkTable.spellName),"pet"))
	end,
	text = function(checkTable) 
		return "pet ability " .. WhatsNext:GetSpellName(checkTable.spellName) .. " is set to autocast."
	end,
	arguments = {
		spellName = {label = "Spell", type = "spell", default = ""}
	}
})

WhatsNext:AddConditionalStatement("Pet Spell Can Autocast",{
	category = "Pets",
	test = function(checkTable) 
		return select(1,GetSpellAutocast(WhatsNext:GetSpellName(checkTable.spellName),"pet"))
	end,
	text = function(checkTable) 
		return "pet ability " .. WhatsNext:GetSpellName(checkTable.spellName) .. " can be set to autocast."
	end,
	arguments = {
		spellName = {label = "Spell", type = "spell", default = ""}
	}
})

WhatsNext:AddConditionalStatement("Pet Mode Active",{
	category = "Pets",
	test = function(checkTable) 
		for i=1,10 do
			if GetPetActionInfo(i) == checkTable.modeName then
				return select(5,GetPetActionInfo(i,"pet"))
			end
		end
		return false
	end,
	text = function(checkTable) 
		return "pet mode " .. tostring(WhatsNext.valueLists.petModes[checkTable.modeName] or checkTable.modeName) .. " is on the pet action bar and active."
	end,
	arguments = {
		modeName = {label = "Mode", type = "dropdown", default = "PET_MODE_DEFENSIVE", possibleValues = WhatsNext.valueLists.petModes},
	}
})