@php
    $thread = $thread ?? null;
    $category = $category ?? null;
@endphp

<nav class="text-sm text-zinc-400" aria-label="Breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList">
    <ol class="flex flex-wrap items-center gap-2">
        <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
            <a itemprop="item" href="{{ url('/') }}" class="hover:text-zinc-200"><span itemprop="name">Home</span></a>
            <meta itemprop="position" content="1">
        </li>
        <li aria-hidden="true">/</li>
        <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
            <a itemprop="item" href="{{ route('forum.index') }}" class="hover:text-zinc-200"><span itemprop="name">Forum</span></a>
            <meta itemprop="position" content="2">
        </li>
        <li aria-hidden="true">/</li>
        <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
            <a itemprop="item" href="{{ isset($category) ? route('forum.category.show', ['category' => $category->slug]) : route('forum.index') }}" class="hover:text-zinc-200">
                <span itemprop="name">{{ $category->name ?? 'Category' }}</span>
            </a>
            <meta itemprop="position" content="3">
        </li>
        <li aria-hidden="true">/</li>
        <li class="text-zinc-200" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
            <span itemprop="name">{{ $thread->title ?? 'Thread' }}</span>
            <meta itemprop="position" content="4">
        </li>
    </ol>
</nav>
