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

<table>
    <tr>
        <td width="5%" class="veicolo-title-cell"></td>
        <td width="25%" class="veicolo-title-cell">COGNOME:</td>
        <td width="25%" class="veicolo-content-cell">
            {{ $passeggero->lastname }}
        </td>
        <td width="25%" class="veicolo-title-cell">NOME:</td>
        <td width="25%" class="veicolo-content-cell">
            {{ $passeggero->firstname }}
        </td>
    </tr>
    <tr>
        <td width="5%" class="veicolo-title-cell"></td>
        <td width="20%" class="veicolo-title-cell">NATO A:</td>
        <td width="20%" class="veicolo-content-cell">
            {{ optional($passeggero->birth_town_id_value)->name ?? 'N/A' }}
        </td>
        <td width="25%" class="veicolo-title-cell">NATO IL:</td>
        <td width="25%" class="veicolo-content-cell">
            {{ DateHelper::formatDate($passeggero->birth_date) }}
        </td>
    </tr>

    <tr>
        <td width="5%" class="veicolo-title-cell"></td>
        <td width="20%" class="veicolo-title-cell">DOCUMENTO:</td>
        <td width="20%" class="veicolo-content-cell">
            {{ PasseggeroStatusHelper::getStatusText(
                $passeggero->documento_tipo,
                PasseggeroStatusHelper::getDocumentTypeMap()
            ) }}
        </td>
        <td width="30%" class="veicolo-title-cell">NUMERO:</td>
        <td width="25%" class="veicolo-content-cell">
            {{ $passeggero->documento_numero }}
        </td>
    </tr>
    <tr>
        <td width="5%" class="veicolo-title-cell"></td>
        <td width="25%" class="veicolo-title-cell">SEDICENTE:</td>
        <td width="20%" class="veicolo-content-cell">
            {{ $passeggero->sedicente ? 'SI' : 'NO' }}
        </td>
    </tr>

    <tr>
        <td width="5%" class="veicolo-title-cell"></td>
        <td width="35%" class="veicolo-title-cell">PASSEGGERO INFORTUNATO:</td>
        <td width="20%" class="veicolo-content-cell">
            {{ PasseggeroStatusHelper::getStatusText(
                $passeggeroRecord->infortunato,
                PasseggeroStatusHelper::getInjuryStatusMap()
            ) }}
        </td>
    </tr>
    <tr>
        <td></td>
    </tr>
</table>
