#pragma once #include "config/WUPSConfig.h" #include "plugin/PluginData.h" #include struct GeneralConfigInformation { std::string name; std::string author; std::string version; std::shared_ptr pluginData; }; class ConfigDisplayItem { public: ConfigDisplayItem(GeneralConfigInformation &info, std::unique_ptr config, bool isActive) : mConfig(std::move(config)), mInfo(std::move(info)), mIsActivePlugin(isActive) { assert(mConfig); } [[nodiscard]] const GeneralConfigInformation &getConfigInformation() const { return mInfo; } [[nodiscard]] const WUPSConfigAPIBackend::WUPSConfig &getConfig() const { return *mConfig; } [[nodiscard]] bool isActivePlugin() const { return mIsActivePlugin; } void toggleIsActivePlugin() { mIsActivePlugin = !mIsActivePlugin; } private: std::unique_ptr mConfig; GeneralConfigInformation mInfo; bool mIsActivePlugin; };