{{ __('Threads') }}

{{ __('Insights') }}

@php $fmt = fn ($n) => $n >= 1000000 ? round($n/1000000,1).'M' : ($n >= 1000 ? round($n/1000,1).'K' : (string) (int) $n); $acctCards = [['followers_count','Followers'],['views','Views'],['likes','Likes'],['replies','Replies'],['reposts','Reposts'],['quotes','Quotes']]; @endphp @forelse ($data as $d)
@if ($d['account']->profile_pic_url) @endif
{{ '@' . ($d['account']->username ?: $d['account']->threads_user_id) }}
{{-- Account totals --}}
@foreach ($acctCards as [$key, $label])
{{ __($label) }}
{{ $fmt($d['totals'][$key] ?? 0) }}
@endforeach
{{-- Follower demographics --}} @php $demo = $d['demographics'] ?? []; $hasDemo = collect($demo)->flatten()->isNotEmpty(); @endphp @if ($hasDemo)
@foreach (['country' => __('Top countries'), 'age' => __('Age'), 'gender' => __('Gender')] as $bd => $title)
{{ $title }}
@php $rows = $demo[$bd] ?? []; $max = max(1, ...(count($rows) ? array_values($rows) : [1])); @endphp @forelse ($rows as $label => $count)
{{ $label }}{{ $fmt($count) }}
@empty
{{ __('No data') }}
@endforelse
@endforeach
@endif {{-- Per-post table --}}
{{ __('Post') }}
{{ __('Views') }}
{{ __('Likes') }}
{{ __('Replies') }}
{{ __('Reposts') }}
{{ __('Quotes') }}
{{ __('Shares') }}
@forelse ($d['posts'] as $row) @php $ins = $row['insights']; $p = $row['post']; @endphp
{{ $p->text ?: '('.$p->media_type.')' }}
{{ optional($p->published_at)->format('M j, H:i') }}
{{ $fmt($ins['views'] ?? 0) }}
{{ $fmt($ins['likes'] ?? 0) }}
{{ $fmt($ins['replies'] ?? 0) }}
{{ $fmt($ins['reposts'] ?? 0) }}
{{ $fmt($ins['quotes'] ?? 0) }}
{{ $fmt($ins['shares'] ?? 0) }}
@empty
{{ __('No published posts yet.') }}
@endforelse
@empty

{{ __('Connect a Threads account to see insights.') }}

{{ __('Connect Threads') }}
@endforelse