#ifndef ZONEFILE_H
#define ZONEFILE_H

#include "xasset.h"
#include "xassetlist.h"
#include "xfile.h"

#include <QStringList>
#include <QIcon>
#include <QMap>

class ZoneFile
{
public:
    ZoneFile();
    ~ZoneFile();
    ZoneFile(const ZoneFile &aZoneFile);
    ZoneFile &operator=(const ZoneFile &other);

    virtual bool Load(const QByteArray aFileData);
    virtual bool Load(const QString aFilePath);
    virtual QByteArray GetBinaryData();

    QString GetStem() const;
    QString GetBaseStem() const;
    quint32 GetSize() const;
    quint32 GetTagCount() const;
    QStringList GetTags() const;
    QVector<XAssetType> GetTypes() const;
    XAssetList GetAssetList() const;
    QStringList GetNames() const;

    void SetStem(const QString aStem);
    void SetSize(quint32 aSize);
    void SetTagCount(quint32 aTagCount);
    void SetTags(const QStringList aTags);
    void SetRecordCount(quint32 aRecordCount);
    void SetRecords(const QStringList aRecords);
    void SetHeaderData(XFile aHeaderData);
    void SetAssetList(XAssetList aAssetList);
    XAssetType GetType(quint32 aRawType) const;

protected:
    void pSetType(quint32 aRawType, XAssetType aType);

private:
    QString mStem;
    quint32 mSize;
    quint32 mTagCount;
    QStringList mTags;
    quint32 mRecordCount;
    QStringList mRecords;
    QVector<XAssetType> mAssetTypes;
    QString mPlatform;
    QString mGame;

    QMap<quint32, XAssetType> mTypeMap;

    XFile mHeaderData;
    XAssetList mAssetList;
};

#endif // ZONEFILE_H
