#ifndef EQUIPMENT_HPP_INCLUDED
#define EQUIPMENT_HPP_INCLUDED

#include "../../../Game/Interactable/Item.hpp"
#include <cstdint>
#include <vector>
#include <string>
#include <functional>

/** @addtogroup GameTabs
* @{ */
class Equipment
{
    public:
        typedef enum SLOT
        {
            HEAD,
            CAPE,
            NECK,
            WEAPON,
            BODY,
            SHIELD,
            LEGS,
            HANDS,
            FEET,
            RING,
            AMMO
        } SLOT;

        static bool IsOpen();
        static bool Open();
        static bool IsEmpty();

        static std::vector<int32_t> GetItemIDs();
        static std::vector<std::string> GetItemNames();
        static std::vector<std::int32_t> GetItemAmounts();

        static std::vector<Interactable::Item> GetItems();
        static std::vector<Interactable::Item> GetItems(std::int32_t ID);
        static std::vector<Interactable::Item> GetItems(const std::string& Name);
        static std::vector<Interactable::Item> GetItems(const std::vector<SLOT>& Slots);
        static std::vector<Interactable::Item> GetItems(const std::vector<std::int32_t>& IDs);
        static std::vector<Interactable::Item> GetItems(const std::vector<std::string>& Names);
        static std::vector<Interactable::Item> GetItems(const std::function<bool (const Interactable::Item&)>& Filter);

        static Interactable::Item GetItem(SLOT Slot);
        static Interactable::Item GetItem(std::int32_t ID);
        static Interactable::Item GetItem(const std::string& Name);
        static Interactable::Item GetItem(const std::vector<std::int32_t>& IDs);
        static Interactable::Item GetItem(const std::vector<std::string>& Names);
        static Interactable::Item GetItem(const std::function<bool (const Interactable::Item&)>& Filter);

        static std::int32_t Count(SLOT Slot);
        static std::int32_t Count(std::int32_t ID);
        static std::int32_t Count(const std::string& Name);
        static std::int32_t Count(const Interactable::Item& Item);
        static std::int32_t Count(const std::vector<std::int32_t>& IDs);
        static std::int32_t Count(const std::vector<std::string>& Names);
        static std::int32_t Count(const std::vector<Interactable::Item>& Items);

        static SLOT GetSlotOf(std::int32_t ID);
        static SLOT GetSlotOf(const std::string& Name);

        static bool Contains(std::int32_t ID);
        static bool Contains(const std::string& Name);
        static bool Contains(const Interactable::Item& Item);
        static bool Contains(const std::vector<std::int32_t>& IDs); // true if all items are found at least once
        static bool Contains(const std::vector<std::string>& Names); // true if all items are found at least once
        static bool Contains(const std::vector<Interactable::Item>& Items);

        static bool ContainsAny(const std::vector<std::int32_t>& IDs);
        static bool ContainsAny(const std::vector<std::string>& Names);
        static bool ContainsAny(const std::vector<Interactable::Item>& Items);

        static bool ContainsOnly(std::int32_t ID);
        static bool ContainsOnly(const std::string& Name);
        static bool ContainsOnly(const Interactable::Item& Item);
        static bool ContainsOnly(const std::vector<std::int32_t>& IDs);
        static bool ContainsOnly(const std::vector<std::string>& Names);
        static bool ContainsOnly(const std::vector<Interactable::Item>& Items);

        static bool Unequip(std::int32_t ID);
        static bool Unequip(const std::string& Name);
        static bool Unequip(const Interactable::Item& Item);
};

/** @} */

#endif // EQUIPMENT_HPP_INCLUDED
