/*
   SPDX-FileCopyrightText: 2025 Laurent Montel <montel@kde.org>

   SPDX-License-Identifier: LGPL-2.0-or-later
*/
#pragma once
#include "textautogeneratetext_export.h"
#include <KPluginMetaData>
#include <QString>

namespace TextAutoGenerateText
{
namespace TextAutoGeneratePluginUtils
{
struct TEXTAUTOGENERATETEXT_EXPORT PluginUtilData {
    QString mIdentifier;
    QString mName;
    QString mDescription;
    bool mEnableByDefault = false;
    bool mHasConfigureDialog = false;
};

[[nodiscard]] TextAutoGeneratePluginUtils::PluginUtilData createPluginMetaData(const KPluginMetaData &metaData);
[[nodiscard]] bool
isPluginActivated(const QStringList &enabledPluginsList, const QStringList &disabledPluginsList, bool isEnabledByDefault, const QString &pluginId);
[[nodiscard]] QPair<QStringList, QStringList> loadPluginSetting(const QString &groupName, const QString &prefixSettingKey);
void savePluginSettings(const QString &groupName,
                        const QString &prefixSettingKey,
                        const QStringList &enabledPluginsList,
                        const QStringList &disabledPluginsList);
};
}
