#pragma once

#include <QWidget>
#include <QListWidget>
#include <QLabel>
#include <QPixmap>
#include <vector>

namespace scar {

struct UserInfo {
    QString username;
    QString status;
    QPixmap avatar; // From database AVATAR_PIC
};

class UserListWidget : public QWidget {
    Q_OBJECT

public:
    explicit UserListWidget(QWidget* parent = nullptr);
    
    void addUser(const UserInfo& user);
    void removeUser(const QString& username);
    void updateUserStatus(const QString& username, const QString& status);
    void clear();
    
    int userCount() const;

private:
    QListWidget* listWidget_;
    QPixmap createDefaultAvatar(); // "SC" placeholder
};

} // namespace scar
