@props([ 'target' => null, 'checkoutDate' => null, 'checkoutBy' => null, ]) @if ($target || $checkoutDate || $checkoutBy) @if ($target) @php $iconType = match (class_basename($target)) { 'User' => 'user', 'Asset' => 'asset', 'Location' => 'location', default => null, }; $tagColor = $target->tag_color ?? null; $link = method_exists($target->present(), 'formattedNameLink') ? $target->present()->formattedNameLink() : e($target->present()->fullName() ?? $target->name ?? ''); @endphp @if ($iconType) @endif {!! $link !!} @endif @if ($checkoutDate || $checkoutBy) @if ($checkoutDate) {{ \App\Helpers\Helper::getFormattedDateObject($checkoutDate, 'datetime', false) }} @endif @if ($checkoutBy) {{ strtolower(trans('general.by')) }} {!! $checkoutBy->present()->formattedNameLink() !!} @endif @endif @endif