
{% extends 'core/base.html' %}

{% block content %}
    <div class="d-flex justify-content-between align-items-center mb-3">
        <h1>Dettagli Cliente</h1>
        <div>
            <a href="{% url 'cliente_edit' object.pk %}" class="btn btn-warning">Modifica</a>
            <a href="{% url 'cliente_delete' object.pk %}" class="btn btn-danger">Elimina</a>
        </div>
    </div>

    <div class="card mb-4">
        <div class="card-body">
            <h5 class="card-title">{{ object.nome }} {{ object.cognome }}</h5>
            <p class="card-text"><strong>Codice Fiscale:</strong> {{ object.codice_fiscale }}</p>
            <p class="card-text"><strong>Email:</strong> {{ object.email }}</p>
            <p class="card-text"><strong>Telefono:</strong> {{ object.telefono }} <a href="https://wa.me/{{ object.telefono }}" target="_blank">(WhatsApp)</a></p>
            <p class="card-text"><strong>Data di Nascita:</strong> {{ object.data_di_nascita }}</p>
            <p class="card-text"><strong>Lavoro:</strong> {{ object.lavoro }}</p>
            <p class="card-text"><strong>Stato:</strong> {{ object.stato }}</p>
            <p class="card-text"><strong>Categoria:</strong> {{ object.categoria }}</p>
            <p class="card-text"><strong>Importo Portafoglio Attuale:</strong> €{{ object.importo_portafoglio_attuale }}</p>
        </div>
    </div>

    <ul class="nav nav-tabs" id="myTab" role="tablist">
        <li class="nav-item" role="presentation">
            <button class="nav-link active" id="portafogli-tab" data-bs-toggle="tab" data-bs-target="#portafogli" type="button" role="tab" aria-controls="portafogli" aria-selected="true">Portafogli</button>
        </li>
        <li class="nav-item" role="presentation">
            <button class="nav-link" id="attivita-tab" data-bs-toggle="tab" data-bs-target="#attivita" type="button" role="tab" aria-controls="attivita" aria-selected="false">Attività</button>
        </li>
        <li class="nav-item" role="presentation">
            <button class="nav-link" id="documenti-tab" data-bs-toggle="tab" data-bs-target="#documenti" type="button" role="tab" aria-controls="documenti" aria-selected="false">Documenti</button>
        </li>
    </ul>
    <div class="tab-content" id="myTabContent">
        <div class="tab-pane fade show active" id="portafogli" role="tabpanel" aria-labelledby="portafogli-tab">
            <div class="p-3">Contenuto placeholder per i portafogli.</div>
        </div>
        <div class="tab-pane fade" id="attivita" role="tabpanel" aria-labelledby="attivita-tab">
            <div class="p-3">Contenuto placeholder per le attività.</div>
        </div>
        <div class="tab-pane fade" id="documenti" role="tabpanel" aria-labelledby="documenti-tab">
            <div class="p-3">Contenuto placeholder per i documenti.</div>
        </div>
    </div>

{% endblock %}
