#ifndef MODEL_H
#define MODEL_H
#include "ubl-utils.h"
#include "philos_utils.h"
#include "vector.h"
#include "../ubl-strings.h"
typedef struct{
    char* type_arr;
    int id;
    char* quota;
    char* size_memory;
    char* UNIX_file;
    char* files;
    vector actors;
    size_t actors_size;
    char* loaded_keys;
    size_t soft_restriction_size;
    size_t soft_restriction_file;
    size_t severe_limitation_size;
    size_t severe_limitation_file;
    size_t deferring_size;
    size_t deferring_file;

    int size_memory_pow;
    int soft_restriction_size_pow;
    int severe_limitation_size_pow;
    char* device;
    size_t size;
    
} config_u_g_p;

typedef struct {
    vector v_general;
    vector v_user;
    vector v_group;
    vector v_project;
    vector v_disk_status;
    vector v_disk_remove;
    vector v_remove;
    int flag_set_data;
    int flag_save;
    int flag_load;
    int count_remove;
    int flag_not_data;
} config_all;

typedef struct{
    char* device;
    int status;
    size_t deferring_size;
    size_t deferring_file;
    char* fs;
    char* mount_point;
    char* name;
    
} disk_status;

typedef struct{
    int flag_status;
    int size;
} config_general;

typedef struct{
    int flag_load;
} config_gui;

void model_clear_cfg_device(disk_status* _config);
char* wrapper_str_time(size_t seconds);
void model_template_remove(vector* vec_temp, vector* vec_remove, int index);
void model_search_disk_remove(vector* vec_temp, vector* vec_remove, char* str_disk);
void model_null_str_writing(config_u_g_p* _config);
void model_clear_cfg(config_u_g_p* _config);
void model_array_size_memory();
char* format_actors(vector* vec_actors);
char* model_find_path_to_disk(vector* vec_temp, char* str_path);
void model_search_disk_remove_project(vector* vec_temp,vector* vec_status, vector* vec_remove, char* str_disk);
void model_free_vector_string(vector* vec_str);
void model_format_del_str(config_u_g_p* _config);
void del_disk_to_vector_device(vector* vec_temp, char* str_disk);
int fill_tree_view_user_group(config_all* all_config, hotebook* widget,char* str_fill , int flag_gui_add);
int fill_tree_view_project(config_all* all_config, hotebook* widget, char* str_fill , int flag_gui_add);
int fill_tree_view_generate(vector* vec_fill, vector* vec_status_disk, char* str_fill, GtkWidget* tree_view, GtkListStore* liststoreGeneral);
int fill_tree_view_device(vector* vec_device, hotebook* widget, int flag_gui_add);
#endif