#ifndef RENDER_STATES_H
#define RENDER_STATES_H

#include <string>
#include <list>
// #include <filesystem>
#include <event.hpp>


enum SelectableItem {
    None = 0, RenderObj = 1, Model = 2, Material = 3, Texture = 4, Shader = 5
};

class ListItemWidget;
class States { //=
public:
    States() = delete;
    ~States() = delete;

    static unsigned int DesktopWidth();
    static unsigned int DesktopHeight();

private:
    friend class MainCppHelper;
    static unsigned int desktopWidth;
    static unsigned int desktopHeight;
};


class SelectedItemWidgetGroup { //=
public:
    static SelectedItemWidgetGroup *GetGroup(const char *groupName);

public:
    [[nodiscard]] ListItemWidget *GetCurSelected() const;
    void Select(ListItemWidget *item);
    void UnSelectAll();

private:
    explicit SelectedItemWidgetGroup(const char *name);

    friend class ListItemWidget;
    void Add(ListItemWidget *item);
    void Remove(ListItemWidget *item);
    void UnSelectFromItem(ListItemWidget *item);

    std::string m_GroupName;
    std::list<ListItemWidget *> m_MemberItems;
    ListItemWidget *cur_Selected{};

};

namespace EVENT { //=
struct InspecItem {
    SelectableItem type{};
    std::string path;
    void *resource{};
};

inline Z::Event< InspecItem> OnSelectItem;

}



















#endif //RENDER_STATES_H
