#pragma once

#include "../level/entity.h"
#include "../interface/resourceProvider.h"
#include <list>
#include <mutex>
#include <game/interface/selectable.h>
#include <game/interface/withGui.h>

namespace game{

class exporter: virtual public entity, public selectable, public withGui
{
public:
    exporter(const vec2u &position, level *root);
    ~exporter() = default;

    virtual void update();
    virtual void draw();


    virtual void select() noexcept;
    virtual void hover() noexcept;

    virtual void onGui() noexcept;

    virtual void onNeighbourCreated(entity*);
    virtual void beforeNeighbourDestroyed(entity*);
protected:
    std::list<resourceProvider*> _providers;
    std::mutex _locker;

    bool _needShowGui, _needShowShortInfo;
};

}
