@extends('layouts.app') @section('title', ($topic->title ?? __('Topic')) . ' โ€” ' . config('app.name')) @section('content')
{{-- Breadcrumb --}} {{-- Topic Header --}}

{{ $topic->title ?? __('Topic') }}

{{ substr($topic->author->name ?? 'U', 0, 1) }}
{{ $topic->author->name ?? __('Unknown') }}
ยท {{ isset($topic) ? $topic->created_at->diffForHumans() : '' }} @if(isset($topic->replies_count)) ยท {{ $topic->replies_count }} {{ __('replies') }} @endif
@if(isset($topic->is_pinned) && $topic->is_pinned) {{ __('Pinned') }} @endif
@if(isset($topic->body) && $topic->body)
{!! nl2br(e($topic->body)) !!}
@endif {{-- Reactions --}}
@foreach(['๐Ÿ‘', 'โค๏ธ', '๐Ÿ˜‚', '๐Ÿ˜ฎ', '๐Ÿ‘'] as $emoji)
@csrf
@endforeach
{{-- Replies --}}

{{ __('Replies') }} @if(isset($replies)) ({{ $replies->total() }}) @endif

@if(isset($replies) && $replies->count() > 0) @foreach($replies as $reply)
{{ substr($reply->author->name ?? 'U', 0, 1) }}
{{ $reply->author->name ?? __('Unknown') }} {{ $reply->created_at->diffForHumans() }}

{{ $reply->body }}

{{-- Reply reactions --}}
@foreach(['๐Ÿ‘', 'โค๏ธ', '๐Ÿ‘'] as $emoji)
@csrf
@endforeach
@endforeach @if($replies->hasPages())
{{ $replies->links() }}
@endif @else

{{ __('No replies yet. Be the first to respond!') }}

@endif
{{-- Reply Form --}} @auth

{{ __('Post a Reply') }}

@csrf @error('body')

{{ $message }}

@enderror
@else

{{ __('Sign in') }} {{ __('to post a reply.') }}

@endauth
@endsection