@php
    $user = $user ?? null;
@endphp

<div class="dashboard-card">
    <div class="dashboard-card-header">
        <h3 class="dashboard-card-title">
            <i class="fa-solid fa-user-circle me-2"></i>
            {{ __("Minhas Informações") }}
        </h3>
    </div>
    <div class="dashboard-card-body">
        <div class="user-info-list">
            @include('components.dashboard._infoItem', [
                'label' => 'E-mail',
                'value' => $user->email ?? '',
                'icon' => 'fa-solid fa-envelope',
                'iconBg' => 'bg-primary'
            ])
            @if($user && $user->phoneNumber)
            @include('components.dashboard._infoItem', [
                'label' => 'Telefone',
                'value' => $user->phoneNumber,
                'icon' => 'fa-solid fa-phone',
                'iconBg' => 'bg-success'
            ])
            @endif
            @if($user && $user->cpf)
            @include('components.dashboard._infoItem', [
                'label' => 'CPF',
                'value' => $user->cpf,
                'icon' => 'fa-solid fa-id-card',
                'iconBg' => 'bg-warning'
            ])
            @endif
            @if($user)
            @include('components.dashboard._infoItem', [
                'label' => 'Membro desde',
                'value' => date('d/m/Y', strtotime($user->created_at)),
                'icon' => 'fa-solid fa-calendar',
                'iconBg' => 'bg-info'
            ])
            @endif
        </div>
    </div>
</div>

