/*
 * Copyright 2025 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 KAGLOBAL_H
#define KAGLOBAL_H

#include <QWidget>
#include <QDialog>
#include <QLabel>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QTextEdit>
#include <QPushButton>
#include <QIcon>
#include <QComboBox>
#include <QScrollArea>
#include <QScrollBar>
#include <QMessageBox>
#include <QDesktopServices>
#include <QJsonObject>
#include <QJsonDocument>
#include <QJsonArray>
#include <QFile>
#include <QDir>

#include "libukcc/widgets/SettingWidget/addbutton.h"
#include "libukcc/widgets/SettingWidget/settinggroup.h"


#include <kysdk/applications/kswitchbutton.h>
#include <kysdk/applications/kpasswordedit.h>
#include <kysdk/applications/kborderlessbutton.h>
#include <aiconfig/modelconfig.h>
#include <polkit-qt6-1/polkitqt1-authority.h>

using namespace kyai::config::model;
typedef struct {
    AiCapability capability;
    QString vendor;
    QString modelName;
    std::vector<MultiAuthentication> multiAuths;

} PublicCloudModel;

typedef struct {
    AiCapability capability;
    QString vendor;
    QString modelName;
    std::vector<MultiAuthentication> multiAuths;
    QString debName;
} PublicLocalModel;
typedef struct {
    AiCapability capability;
    QString vendor;
    QString modelName;
    QString modelVersion;
    QString apiKey;
    QString apiUrl;
    std::vector<MultiAuthentication> multiAuths;
} PrivateModel;

enum LocalModelInstallStatus {
    InstallSuccess,
    RebootLater,
    Uninstall,
    Downloding,
};
enum PkgInstallStatus {
    PkgNotFound,
    PkgFoundNotInstall,
    PkgFoundNewVersion,
    PkgLastestVersion
};

class kaglobal
{
public:
    static QUrl openLink;       // 帮助文档链接
    static QString ondeviceModelInstallPath;
    static QString aiAssistantPkgName;
    static QString aiAssistantMinVersion;
    static QString aiNotePkgName;
    static QString aiNoteMinVersion;
    static QString launchpadUrl;
    static QString archiveUrl;
    static QString baiduUrl;
};

#endif // KAGLOBAL_H
