#ifndef UTIL_H
#define UTIL_H
#include "../../project_lib.h"

using namespace std;

namespace Utils {
#define file_source_login_min_max "/etc/login.defs"
template<typename Type>
struct Result{
    Type response;
    int error;
};

struct Passwd {
    string user;
    int uid;
};

string format_str_size(int num, int index);
std::array<std::vector<std::string>, 5> read_csv(const std::string& filename);
std::string call(std::string cmd);
vector<int> find_all(string &str_ntp, string substr);
void str_remove(std::string& source, std::string to_remove);
void str_replace_all(string &str_base, string str_find, string str_replace);
std::vector<std::string> split(std::string text, char delim);
vector <string> pars_users();
int synopsis_show(string str_link);
string file_read(string filename);
unsigned short read_uid_min_max(string filename, string search);
vector<string> pars_users();
vector<string> pars_group();
vector<string> list_groups();
}
#endif