#ifndef STORE_H
#define STORE_H

#include "Item.h"
#include "Consumable.h"
#include "Equipment.h"
#include "Player.h"

#include "Ability.h"

#include <libxml/parser.h>

#include <stdint.h>

#include <string>
#include <vector>
using namespace std;

//A Store contains items and equipment for sale. It also filters out stuff.
//A Store also contains abilities for sale.

class Store {
 public:
  Store ();
  ~Store ();

  void initialize ();

  bool addItemToStock (const string & id, const string & type);
  vector <string> & getStoreList ();
  uint8_t buyItem (Player &, int16_t slot);

  uint8_t addAbilityToStore (const string &);
  uint8_t teachAbility (Player &, int16_t slot);
  vector <string> & getStoreAbilityList ();

  bool itemExists (const string &);

 private:
  void repairDescAndPrice ();

  vector <Consumable> consumablesForSale;

  vector <string> consumableDesc;

  vector <Equipment> equipmentForSale;
  vector <string> equipmentDesc;

  vector <string> descAndPrice;
  vector <string> abilityDesc;

  vector <PlayerAbility> abilitiesToTrain;
};

#endif
