#ifndef GPANTHERA_LIBRARY_H
#define GPANTHERA_LIBRARY_H

#include <gtkmm.h>
#include <glibmm.h>
#include <glibmm/ustring.h>
#include <utility>
#include <vector>
#include <memory>

namespace gPanthera {
    class DockStack;

    class DockablePane : public Gtk::Box {
    private:
        Gtk::Label label;
        Glib::ustring name;
        Gtk::Image *icon;
        DockStack *stack;
    public:
        DockablePane(Gtk::Widget &child, const Glib::ustring &name, const Glib::ustring &label, Gtk::Image *icon, DockStack *stack = nullptr, Gtk::Widget *custom_header = nullptr);
        Glib::ustring get_identifier() const;
        Gtk::Image *get_icon() const;
        Gtk::Label *get_label();
        void redock(DockStack *stack);
    };

    class LayoutManager : public Glib::ObjectBase {
    private:
        std::vector<std::shared_ptr<DockablePane>> panes;
    public:
        LayoutManager();

        void add_pane(std::shared_ptr<DockablePane> pane);
    };

    class DockStack : public Gtk::Stack {
    private:
        std::shared_ptr<LayoutManager> layout;
    public:
        explicit DockStack(std::shared_ptr<LayoutManager> layout);

        void add(Gtk::Widget &child, const Glib::ustring &name);
    };

    class DockStackSwitcher : public Gtk::ButtonBox {
    private:
        DockStack *stack;
    public:
        void update_buttons();
        explicit DockStackSwitcher(DockStack *stack);
    };
} // namespace gPanthera

#endif // GPANTHERA_LIBRARY_H