/*
 * Copyright (C) 2020, KylinSoft Co., Ltd.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
#ifndef AIASSISTANTMENUPLUGIN_H
#define AIASSISTANTMENUPLUGIN_H

#include "peony-menu-plugin-kylin-aiassistant_global.h"
#include <menu-plugin-iface.h>
#include <QTranslator>
#include <QLocale>
#include <QApplication>
#include <QProcess>
#include <QAction>
#include <QFileInfo>
#include <QString>
#include <QDebug>

#include <file-info.h>
#include <gio/gio.h>

namespace Peony {

class PEONYMENUPLUGINKYLINAIASSISTANT_EXPORT AiassistantMenuPlugin: public QObject, public MenuPluginInterface
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID MenuPluginInterface_iid FILE "common.json")
    Q_INTERFACES(Peony::MenuPluginInterface)
public:
    explicit AiassistantMenuPlugin(QObject *parent = nullptr);

    PluginInterface::PluginType pluginType() override {return PluginInterface::MenuPlugin;}
    const QString name() override {return tr("Peony-Qt kylin-aiassistant Extension");}
    const QString description() override {return tr("kylin-aiassistant Menu Extension.");}
    const QIcon icon() override {return QIcon::fromTheme("application-zip");}
    void setEnable(bool enable) override {m_enable = enable;}
    bool isEnable() override {return m_enable;}

    QString testPlugin() override {return "test compress";}
    QList<QAction *> menuActions(Types types, const QString &uri, const QStringList &selectionUris) override;

private:
    bool m_enable;
};

}
#endif // AIASSISTANTMENUPLUGIN_H
