{{-- resources/views/components/verbale/passeggeri/dettaglio.blade.php --}}
@php
    use App\Helpers\DateHelper;
    use App\Helpers\PasseggeroStatusHelper;
@endphp

<table class="striped-table">
    <tr>
        <td width="25%" class="veicolo-title-cell" style="padding-bottom:10px:none!important;">COGNOME:</td>
        <td width="25%" class="veicolo-content-cell" style="padding-bottom:10px:none!important;">
            {{ $passeggero->lastname }}
        </td>
        <td width="25%" class="veicolo-title-cell" style="padding-bottom:10px:none!important;">NOME:</td>
        <td width="25%" class="veicolo-content-cell" style="padding-bottom:10px:none!important;">
            {{ $passeggero->firstname }}
        </td>
    </tr>
    <tr>
        <td width="20%" class="veicolo-title-cell" style="padding-bottom:10px:none!important;">NATO A:</td>
        <td width="20%" class="veicolo-content-cell" style="padding-bottom:10px:none!important;">
            {{ optional($passeggero->birth_town_id_value)->name ?? 'N/A' }}
        </td>
        <td width="25%" class="veicolo-title-cell" style="padding-bottom:10px:none!important;">NATO IL:</td>
        <td width="25%" class="veicolo-content-cell" style="padding-bottom:10px:none!important;">
            {{ (!empty($passeggero->birth_date) && Carbon\Carbon::parse($passeggero->birth_date)->year > 0) ? Carbon\Carbon::parse($passeggero->birth_date)->format('d/m/Y') : '-' }}
        </td>
    </tr>

    <tr>
        <td width="20%" class="veicolo-title-cell" style="padding-bottom:10px:none!important;">DOCUMENTO:</td>
        <td width="20%" class="veicolo-content-cell" style="padding-bottom:10px:none!important;">
            {{ PasseggeroStatusHelper::getStatusText(
                $passeggero->documento_tipo,
                PasseggeroStatusHelper::getDocumentTypeMap()
            ) }}
        </td>
        <td width="30%" class="veicolo-title-cell" style="padding-bottom:10px:none!important;">NUMERO:</td>
        <td width="25%" class="veicolo-content-cell" style="padding-bottom:10px:none!important;">
            {{ $passeggero->documento_numero }}
        </td>
    </tr>
    <tr>
        <td width="25%" class="veicolo-title-cell"style="padding-bottom:10px:none!important;">SEDICENTE:</td>
        <td width="20%" class="veicolo-content-cell" style="padding-bottom:10px:none!important;">
            {{ $passeggero->sedicente ? 'SI' : 'NO' }}
        </td>
        <td width="25%" class="veicolo-title-cell" style="padding-bottom:10px:none!important;">PASSEGGERO INFORTUNATO:</td>
        <td width="20%" class="veicolo-content-cell" style="padding-bottom:10px:none!important;">
            {{ PasseggeroStatusHelper::getStatusText(
                $passeggeroRecord->infortunato,
                PasseggeroStatusHelper::getInjuryStatusMap()
            ) }}
        </td>
    </tr>

    <tr>
        <td style="border:none!important;"></td>
    </tr>
</table>
