#include <iostream>
#include <cstring>

using namespace std;

// notación de ->
// players - siempre 5
// всего команд - задает пользователь
// всегда (*что-то) -> ключ = значение (ставить скобки)

int n;

struct Player
{
    char name[30];
    int age;
    int gamesPlayed;
};

struct Team
{
    char name[20];
    int tourWon;
    char category[2];
    Player *players[5];
};

void registerTeam(Team **value);

int main()
{

    int option;

    cout << "Bienvenido al portal de registro de jugadores e equipos!" << endl;
    cout << "Ingrese el numero total de equipos:" << endl;
    cin >> n;
    Team **teams = new Team *[n];

    while (option != 6)
    {
        cout << "1. Registrar equipo" << endl;
        cout << "2. Registrar jugador" << endl;
        cout << "3. Eliminar equipo" << endl;
        cout << "4. Eliminar jugador" << endl;
        cout << "5. Ver registros" << endl;
        cout << "6. Salir" << endl;

        cin >> option;

        switch (option)
        {
        case 1:
            char input[20];
            char category[2];
            int wins;
            for (int i = 0; i < n; i++)
            {
                Team *team = *(teams + i);
                cout << "Ingrese el nombre del equipo con el ID: " << i + 1 << "" << endl;
                cin >> input;

                strcpy((team)->name, input);
                cout << (team)->name << endl;

                cout << "Ingrese el numero de ganadas en el campeonato: \n";
                cin >> wins;
                (team)->tourWon = 2;
                cout << (team)->tourWon << endl;

                cout << "Ingrese la categoria de su equipo: \n";
                cin >> category;
                strcpy((team)->category, category);
                cout << (team)->category << endl;

                Player **players = team->players;
            }
            registerTeam(teams);
            break;
        case 2:
            if (*(teams + 0) == '\0')
            {
            }
        case 6:
            break;
        default:
            cout << "Ingrese un valor valido" << endl;
            delete[] teams;
            return 1;
        }
    }
    delete[] teams;
    return 0;
}

void registerTeam(Team **value)
{
}