#ifndef PRESENTHOSTX_H
#define PRESENTHOSTX_H

#include "manager_docs.h"
#include <QTabWidget>

namespace Components {

    enum GroupType { LEFT = 0, RIGHT = 1, BOTTOM = 2, CENTER = 3 };

    class PresentContainer : public QTabWidget, public PresentHost {
        Q_OBJECT
      public:
        PresentContainer(QTabWidget::TabPosition pos, HostListener *host = nullptr);

        // PresentContainer interface
      public:
        virtual QWidget *hostWidget() const override;

        virtual void append(MakeTools::PresentBase *ins, const Core::Route &key) override;
        virtual bool active(const Core::Route &key) override;
        virtual MakeTools::PresentBase *remove(const Core::Route &key) override;
        virtual bool instContains(MakeTools::PresentBase *ins) const override;
        virtual void setVisibleState(bool state) override;
        virtual bool visibleState() const override;

      signals:
        void presentTransTo(const Core::Route &key, GroupType type);

      private:
        HostListener *const host_inst;
        QHash<Core::Route, MakeTools::PresentBase *> items_store;

        void accept_close_action(int index);
    };

} // namespace Components

#endif // PRESENTHOSTX_H
