//#pragma once
#include <string>
#include <vector>
using namespace std;
class UZIVATEL {
	unsigned int id;
	string pin ="";
	double stavUctu;
public:
	UZIVATEL(unsigned int id0, string pin0, double stavUctu0);
	bool jeSumaNaUcte(double suma0);
	void odratatZUctu(double suma0);
	double zistitStavUctu();
	unsigned int vratitId();
	string vratitPin();
	bool operator==(UZIVATEL uzivatel0);
};

class SPRAVCA_UZIVATELOV {
	vector<UZIVATEL> poleUzivatelia;
	unsigned int pocetUzivatelov;
public:
	SPRAVCA_UZIVATELOV(); 
	bool pridajUzivatela(UZIVATEL uzivatel);
	bool overUzivatelaId(unsigned int id0);
	bool overUzivatela(unsigned int id0, string pin0);
	UZIVATEL vratUzivatela(unsigned int id0, string pin0);
};

class ZOSTAVA_BANKOVIEK {
	public:
		unsigned int pocet10 = 0;
		unsigned int pocet20 = 0;
		unsigned int pocet50 = 0;
		unsigned int pocet100 = 0;
		unsigned int pocet200 = 0;
		unsigned int pocet500 = 0;
/*
public:
	BANKOMATOVA_NAPLN(unsigned int pocet_10, unsigned int pocet_20, unsigned int pocet_50, unsigned int pocet_100, unsigned int pocet_200, unsigned int pocet_500);
	void vloz(unsigned int hodnotaBankovky, unsigned int pocet);
	BANKOMATOVA_NAPLN &operator+=(BANKOMATOVA_NAPLN napln1);
	void vyberBankovku(unsigned int hodnotaBankovky, unsigned int pocet);
*/
};

class VYSLEDOK_VYBERU
{
	public: 
		bool Status;
		ZOSTAVA_BANKOVIEK bankovky;
};

class SPRAVCA_BANKOVIEK
{
	public:
		void doplnitBankovky(ZOSTAVA_BANKOVIEK bankovky);
		void odratatBankovky(ZOSTAVA_BANKOVIEK bankovky);
		unsigned int vratPocetBankoviek(unsigned int hodnota);
	private:
		ZOSTAVA_BANKOVIEK bankovkyBankomat;
};


class BANKOMAT {
	double poplatok = 0;
	SPRAVCA_UZIVATELOV *pUzivatelia;
	SPRAVCA_BANKOVIEK spravcaBankoviek;
	string SystemovaSprava;
public:
	BANKOMAT(SPRAVCA_UZIVATELOV *pUzivatelia, ZOSTAVA_BANKOVIEK prvotnaNapln, double poplatok0);
	bool doplnitBankomat(unsigned int ID, string pin0, ZOSTAVA_BANKOVIEK dopln0);
	double zistitStavUctu(unsigned int ID, string pin0);
	VYSLEDOK_VYBERU vybratPeniaze(unsigned int ID, string pin0, unsigned int suma);
	VYSLEDOK_VYBERU algoritmusZostavyBankoviek(unsigned int suma);
	string vypisatSystemovuSpravu(void);
};
