#ifndef PRIVATEMODELITEMWIDGET_H
#define PRIVATEMODELITEMWIDGET_H

#include <QWidget>
#include <QGSettings>
#include <QMouseEvent>
#include <QMenu>
#include <QLabel>
#include <QVariant>
#include <QToolButton>
#include <QHBoxLayout>

#include <aiconfig/modelconfig.h>

#define THEME_QT_SCHEMA  "org.ukui.style"

using namespace std;
using namespace kyai::config::model;

class PrivateModelItemWidget : public QWidget
{
    Q_OBJECT
public:
    explicit PrivateModelItemWidget(AiCapability capability,QString modelName, QWidget *parent = nullptr);
    ~PrivateModelItemWidget();

    void showSelectedIcon(bool flag);
    bool isSelected();
    AiCapability getAICapability();
    QString getModelName();

signals:
    void sigEdit(AiCapability capability, QString modelName);
    void sigDelete(AiCapability capability, QString modelName);

private:
    void initLayout();
    void initMenu();
    QLabel *m_nameLabel = nullptr;        // 模型名称
    QToolButton *m_moreButton = nullptr;  // 更多
    QMenu *m_menu = nullptr;              // 菜单
    QLabel *m_selectedIconLabel = nullptr;// 已选择状态
    kyai::config::model::AiCapability m_capability;
    QString m_modelName;

};

#endif // PRIVATEMODELITEMWIDGET_H
