@php
$sender = $beneficiary_transaction->sender;
$fields = [
['type' , 'ri-list-check', $sender->type == USER_TYPE_INDIVIDUAL ? tr('individual') : tr('business')],
['first_name', 'ri-user-line', $sender->title . " " . $sender->first_name],
['middle_name', 'ri-user-line', $sender->middle_name],
['last_name', 'ri-user-line', $sender->last_name],
['email', 'ri-mail-line', $sender->email],
['mobile_country_code', 'ri-phone-line', $sender->mobile_country_code],
['mobile', 'ri-smartphone-line', $sender->mobile],
['dob', 'ri-calendar-line', common_date($sender->dob, auth()->user()->timezone, 'd M Y h:i A')],
['country', 'ri-map-pin-line', get_country($sender->country)],
['address_1', 'ri-road-map-line', $sender->address_1],
['address_2', 'ri-road-map-line', $sender->address_2],
['city', 'ri-building-line', $sender->city],
['state', 'ri-building-line', $sender->state],
['postal_code', 'ri-mail-send-line', $sender->postal_code],
['type', 'ri-list-check', $sender->type == USER_TYPE_INDIVIDUAL ? tr('individual') : tr('business')],
['id_type', 'ri-id-card-line', \App\Models\Lookup::findValuebyKey($sender->id_type, LOOKUP_TYPE_ID_TYPE) ?? ''],
['id_number', 'ri-hashtag', $sender->id_number],
['source_of_funds', 'ri-wallet-line', $sender->source_of_funds],
['status', 'ri-shield-check-line', sender_status_formatted($sender->status)],
['created_at', 'ri-time-line', common_date($sender->created_at, auth()->user()->timezone, 'd M Y h:i A')],
['updated_at', 'ri-refresh-line', common_date($sender->updated_at, auth()->user()->timezone, 'd M Y h:i A')],
];
$notEmpty = fn($v) => !($v === null || $v === '' || $v === []);
@endphp
@foreach ($fields as $field)
@if ($notEmpty($field[2]))
{{ tr($field[0]) }}
{{ $field[2] ?: tr('na') }}
@endif
@endforeach