#pragma once

#include "../interface.h"

class CMailFrame;
extern CMailFrame*			g_pMailFrame;

class CMailFrame : public CInterfaceBase
{
public:
	CMailFrame(CInterface* object);
	virtual ~CMailFrame();

	virtual	void				RegisterFunc();
	virtual	void				OpenMail();
	virtual	void				CloseMail();
	virtual	void				InboxUpdate();
	virtual	void				Clear();
	virtual	void				SetMoney(bool isCOD, int money);
	virtual	void				Pickup();
	virtual	void				PutDown(int bagIndex);
	virtual	void				SendMail(const char* target, const char* subject, const char* body);
	virtual	int					GetSendMailItemIndex()						{ return m_sendMailItemIndex; }
	virtual	void				SendMailUnlocked()							{ m_sendMailLocked = false; }
	
protected:
	virtual	void				SetSendMailItemIndex(int index);
protected:
	bool						m_inboxOpenLocked;
	bool						m_sendMailLocked;
	bool						m_isCOD;
	int							m_money;
	int							m_sendMailItemIndex;
};