@props(['trainer']) @php $links = collect([ [ 'label' => 'تماس تلفنی', 'value' => $trainer->phone, 'href' => $trainer->phone ? 'tel:'.$trainer->phone : null, 'icon' => 'phone', 'color' => 'text-emerald-700', ], [ 'label' => 'واتساپ', 'value' => $trainer->whatsapp ?? $trainer->phone, 'href' => $trainer->whatsappUrl(), 'icon' => 'whatsapp', 'color' => 'text-green-700', ], [ 'label' => 'تلگرام', 'value' => $trainer->telegram, 'href' => $trainer->telegramUrl(), 'icon' => 'telegram', 'color' => 'text-sky-700', ], [ 'label' => 'اینستاگرام', 'value' => $trainer->instagram, 'href' => $trainer->instagramUrl(), 'icon' => 'instagram', 'color' => 'text-pink-700', ], [ 'label' => 'ایمیل', 'value' => $trainer->email, 'href' => $trainer->email ? 'mailto:'.$trainer->email : null, 'icon' => 'mail', 'color' => 'text-gray-700', ], ])->filter(fn ($item) => filled($item['value'])); @endphp @if ($links->isEmpty())

اطلاعات تماسی ثبت نشده است.

@else
@foreach ($links as $link) @if ($link['href']) @include('components.icons.contact-'.$link['icon']) {{ $link['label'] }} {{ $link['value'] }} @else
@include('components.icons.contact-'.$link['icon']) {{ $link['label'] }} {{ $link['value'] }}
@endif @endforeach
@endif