// This Header is auto generated by BDSLiteLoader Toolchain
#pragma once
#define AUTO_GENERATED
#include "../Global.h"
#include "Packet.hpp"

#define BEFORE_EXTRA
// Include Headers or Declare Types Here
#include "CommandFlag.hpp"
enum CommandPermissionLevel : char;

#undef BEFORE_EXTRA

class AvailableCommandsPacket : public Packet {

#define AFTER_EXTRA
    // Add Member There
public:
    struct EnumData
    {
        std::string name;
        std::vector<unsigned int> valueIndices;
    };//56
    struct ConstrainedValueData
    {
        int enumIndex;
        int enumNameIndex;
        std::vector<unsigned char> indices;
    };
    struct ParamData
    {
        std::string desc;
        unsigned int sym;
    };
    struct OverloadData
    {
        std::vector<ParamData> datas;
    };
    struct CommandData
    {
        std::string name;                    //0
        std::string description;             //32
        CommandFlag flag;                    //64
        CommandPermissionLevel perm;         //66
        std::vector<OverloadData> overloads; //72
        signed int aliasIndex;               //96
    };//104
    struct SoftEnumData
    {
        std::string name;
        std::vector<std::string> values;
    };//56

    std::vector<std::string> mAllEnums;//48
    std::vector<std::string> mAllSuffix;//72
    std::vector<EnumData> mEnumDatas;//96
    std::vector<CommandData> mCommandDatas;//120
    std::vector<SoftEnumData> mSoftEnums;//144
    std::vector<ConstrainedValueData> mConstrainedValueDatas; //168
    inline void test()
    {
        static_assert(sizeof(AvailableCommandsPacket) == 184);
        static_assert(sizeof(EnumData) == 56);
        static_assert(sizeof(CommandData) == 104);
        static_assert(offsetof(CommandData, perm) == 66);
        static_assert(offsetof(AvailableCommandsPacket, mAllEnums) == 40);
        static_assert(offsetof(AvailableCommandsPacket, mAllSuffix) == 64);
        static_assert(offsetof(AvailableCommandsPacket, mConstrainedValueDatas) == 160);
    }

public:
    inline std::vector<std::string> getEnumNames()
    {
        std::vector<std::string> names;
        for (auto& data : mEnumDatas) {
            names.push_back(data.name);
        }
        return names;
    }
    inline std::vector<std::string> getSoftEnumNames()
    {
        std::vector<std::string> names;
        for (auto& data : mSoftEnums)
        {
            names.push_back(data.name);
        }
        return names;
    }
    inline std::vector<std::string> getEnumValues(std::string const& name)
    {
        std::vector<std::string> values;
        for (auto& data : mEnumDatas)
        {
            if (data.name == name)
            {
                for (auto& index : data.valueIndices) {
                    values.push_back(mAllEnums.at(index));
                }
                break;
            }
        }
        return values;
    }
    inline std::vector<std::string> getSoftEnumValues(std::string const& name)
    {
        for (auto& data : mSoftEnums)
        {
            if (data.name == name)
                return data.values;
        }
        return {};
    }

#undef AFTER_EXTRA
#ifndef DISABLE_CONSTRUCTOR_PREVENTION_AVAILABLECOMMANDSPACKET
public:
    class AvailableCommandsPacket& operator=(class AvailableCommandsPacket const &) = delete;
    AvailableCommandsPacket(class AvailableCommandsPacket const &) = delete;
    AvailableCommandsPacket() = delete;
#endif

public:
    /*0*/ virtual ~AvailableCommandsPacket();
    /*1*/ virtual enum MinecraftPacketIds getId() const;
    /*2*/ virtual std::string getName() const;
    /*3*/ virtual void write(class BinaryStream &) const;
    /*4*/ virtual enum StreamReadResult read(class ReadOnlyBinaryStream &);
#ifdef ENABLE_VIRTUAL_FAKESYMBOL_AVAILABLECOMMANDSPACKET
#endif

};