#ifndef CONTROLLER_H
#define CONTROLLER_H
#include "my_type.h"
#include "view/view_open_browser.h"
#include "view/view_about.h"
#include "view/ubl-settings-diskquota.h"
#include "view/model/wrapper_load_save.h"
#include "view/view_filters.h"
#include "view/view_add_user_group.h"
#include "view/view_edit_user_group.h"
#include "view/view_edit_project.h"
#include "view/view_add_project.h"

extern int socket_ext_id_I;
extern int socket_trd_id_I;

class Controller : public Gtk::ApplicationWindow
{
private:
    Glib::RefPtr<Gtk::Builder> builder;
    map_str_str map_gui_cfg;
    map_str_str map_global_cfg;
    map_str_str map_system_cfg;
public:
    ~Controller();
    void settings();
    View_open_browser* obj_open_browser = new View_open_browser();
    View_about* obj_view_about = new View_about();
    MainWindow* obj_main_window;
    Wrapper_load_save *obj_wrapper_load_save = new Wrapper_load_save();
    View_filters obj_view_filters = View_filters();
    View_add_user_group obj_view_add = View_add_user_group();
    View_edit_user_group obj_view_edit = View_edit_user_group();
    View_edit_project obj_view_edit_project = View_edit_project();
    View_add_project obj_view_add_project = View_add_project();
    Controller(BaseObjectType* obj, Glib::RefPtr<Gtk::Builder> const& builder);
    Controller(Glib::RefPtr<Gtk::Builder> const& builder);


};

class CmdArgParser : public Glib::OptionGroup {
public:
    CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help);
    ::Window GetSocketID() const;
private:
    int m_socketID = 0;

};
class SettingsPlug : public Gtk::Plug{
public:
    Gtk::Window *window;
    SettingsPlug(::Window p_socketID, Glib::RefPtr<Gtk::Builder> builder);

private:
    Gtk::Widget *plugBox;
    Gtk::Widget *parent;
};
#endif