#ifndef CONTROLLER_USER_INFO_H
#define CONTROLLER_USER_INFO_H

#include "view_user_info.h"
#include "session_manager.h"

class controller_user_info
{
public:
  /**
   * @brief controller_user_info
   * Controller that expose users info
   * @param view View to controle
   * @param session Model that have funcionality
   * @param container Container of the aplication
   */
  controller_user_info(view_user_info *view, session_manager *session, Gtk::Window *container);
private:
  view_user_info *view;
  session_manager *sesion;
  Gtk::Window *container;
  /**
   * @brief load_info
   * Load the info in the table
   */
  void load_info();
  /**
   * @brief add_controlers
   * Add controlers to the bottons
   */
  void add_controlers();
  /**
   * @brief on_button_clicked_add
   * Button add function
   */
  void on_button_clicked_add();
  /**
   * @brief on_button_clicked_remove
   * button remove function
   */
  void on_button_clicked_remove();
  /**
   * @brief get_first
   * Get the firs string until the special character ":"
   * @param info String to divide, the string have substract the string returned, and the first ":"
   * @return The string substracted
   */
  std::string get_first(std::string &info);
};

#endif // CONTROLLER_USER_INFO_H