/*****************************************************************************
 * Copyright (c) 2014-2026 OpenRCT2 developers
 *
 * For a complete list of all authors, please refer to contributors.md
 * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
 *
 * OpenRCT2 is licensed under the GNU General Public License version 3.
 *****************************************************************************/

#pragma once

#include "../actions/GameAction.hpp"
#include "../localisation/StringIdType.h"

#include <array>
#include <string>
#include <vector>

namespace OpenRCT2::Network
{
    enum class Permission : uint32_t
    {
        chat,
        terraform,
        setWaterLevel,
        togglePause,
        createRide,
        removeRide,
        buildRide,
        rideProperties,
        scenery,
        path,
        clearLandscape,
        guest,
        staff,
        parkProperties,
        parkFunding,
        kickPlayer,
        modifyGroups,
        setPlayerGroup,
        cheat,
        toggleSceneryCluster,
        passwordlessLogin,
        modifyTile,
        editScenarioOptions,
        dragPathArea,

        count,
    };

    class NetworkAction final
    {
    public:
        StringId name;
        std::string permissionName;
        std::vector<GameCommand> commands;
    };

    class NetworkActions final
    {
    public:
        static const std::array<NetworkAction, static_cast<size_t>(Permission::count)> kActions;

        static Permission findCommand(GameCommand command);
        static Permission findCommandByPermissionName(const std::string& permission_name);
    };
} // namespace OpenRCT2::Network
