@extends('frontend.layouts.user.index')
@section('title', __('Recipients'))
@push('styles')
@endpush
@section('content')
@php
$tones = ['indigo','rose','amber','teal','violet','sky'];
@endphp
@include('frontend.user.remittance.partials._page_header', [
'rmtPageTitle' => __('Recipients'),
'rmtPageSubtitle' => __('Save bank accounts and mobile wallets to send abroad in seconds.'),
'rmtPageIcon' => 'fas fa-users',
'rmtCurrentPage' => 'beneficiaries',
])
{{-- Search --}}
{{-- Grid --}}
@if ($beneficiaries->isEmpty())
@if ($search)
@else
@endif
@else
@foreach ($beneficiaries as $i => $beneficiary)
@php
$tone = $tones[$i % count($tones)];
$initials = collect(explode(' ', $beneficiary->full_name))->map(fn ($w) => mb_substr($w, 0, 1))->take(2)->implode('');
@endphp
{{ $initials }}
{{ getCountryFlagEmoji($beneficiary->country_code) }}
{{ $beneficiary->full_name }}
@if ($beneficiary->is_favorite)
@endif
@if ($beneficiary->nickname)
"{{ $beneficiary->nickname }}"
@endif
{{ $beneficiary->payout_method->label() }}
{{ $beneficiary->country_code }} ยท {{ $beneficiary->currency }}
{{ $beneficiary->masked_account }}
@endforeach
@endif
@endsection