@php $q = $filters['q'] ?? ''; $publicSearchEnabled = $publicSearchEnabled ?? true; $displayOwnerPhonePublic = $displayOwnerPhonePublic ?? true; $hasSearchQuery = trim((string) $q) !== ''; $desktopColumns = 8 + ($displayOwnerPhonePublic ? 1 : 0) + ($hasSearchQuery ? 1 : 0); $highlight = function (?string $text) use ($q): string { $value = e((string) $text); if ($q === '' || $value === '') { return $value; } return preg_replace('/(' . preg_quote($q, '/') . ')/i', '$1', $value) ?? $value; }; $maskedImei = function (?string $value, bool $revealFull = false): string { return \App\Support\PublicSensitiveMasker::maskImei($value, $revealFull); }; $detailQuery = array_filter([ 'q' => $filters['q'] ?? null, 'search_in' => $filters['search_in'] ?? null, ], static fn ($value): bool => is_string($value) && trim($value) !== ''); @endphp

{{ __('messages.mobile_phones') }}

{{ __('messages.mobile_hero_description') }}

{{ __('messages.reset') }}

{{ __('messages.recent_searches') }}

@if ($showPublicStats ?? false) @include('public.partials.general-stats', ['publicStats' => $publicStats ?? null]) @endif @if (! $publicSearchEnabled)

{{ __('messages.public_search_disabled') }}

@else @include('public.partials.featured-records', ['featuredRecords' => $featuredRecords ?? collect()]) @if ($hasSearchQuery) @include('public.partials.search-verdict', ['verdict' => $searchVerdict ?? null]) @endif
@forelse ($mobilePhones as $mobilePhone) @php $canRevealFullImei = (bool) ($mobilePhone->can_reveal_full_imei ?? false); $mobilePhoneDetailsUrl = route('public.mobile-phones.show', array_merge(['mobilePhone' => $mobilePhone], $detailQuery)); @endphp

{!! $highlight($mobilePhone->device_name) !!}

{{ __('messages.reference_number') }}: {{ $mobilePhone->reference_number ?? ('#'.$mobilePhone->id) }}

@if ($mobilePhone->isFeaturedActive())

{{ __('messages.featured_badge_short') }}{{ $mobilePhone->featured_order ? ' #'.$mobilePhone->featured_order : '' }}

@endif

{!! $highlight($maskedImei($mobilePhone->imei, $canRevealFullImei)) !!}

{!! $highlight($mobilePhone->phone_number) !!}

{!! $highlight($mobilePhone->stolen_address) !!}

@if ($displayOwnerPhonePublic)

{!! $highlight($mobilePhone->owner_phone) !!}

@endif

{{ __('messages.stolen_at') }}: {{ $mobilePhone->stolen_at?->format('Y-m-d H:i') ?? '-' }}

@if ($hasSearchQuery) @include('public.partials.match-result', ['meta' => $mobilePhone->match_meta ?? null]) @endif {{ __('messages.status_'.$mobilePhone->status) }}
@empty
{{ __('messages.no_results') }}
@endforelse
{{ $mobilePhones->links() }}
@endif