#pragma once

struct LoginInfoPointer;
class Buffer;
class Cryptography;
#include <string>
#include <optional>

enum class Arg
{
	Get, // get password for label
	Generate, // generate password for label
	List, // list all labels
	Delete, // delete password for label
	Print_all_p, // print all passwords
	Input, // input password for label
	Change, // change main password
	Show, // show password for label
	Error, // error
	Username, // update username
	Name, // update label name
};

Arg get_args(int argc, char** argv, char** label);

std::optional<LoginInfoPointer> arg_get(Buffer& decrypted_buffer, const char* label);

std::optional<LoginInfoPointer> arg_new_password(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto, bool generate);

void arg_username(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto);

void arg_label_name(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto);

void arg_list(Buffer& decrypted_buffer);

void arg_delete(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto);

void arg_print_all_p(Buffer& decrypted_buffer, std::string& user_pass);

void arg_change(Buffer& decrypted_buffer, Buffer& encrypted_buffer, std::string& user_pass, Cryptography& crypto);

void arg_show(Buffer& decrypted_buffer, const char* label);