@extends('front-end.layouts.apps')

@section('title', 'ټول شاعران')

@section('page_title', 'ټول شاعران')

@section('main_container')
<div class="container" dir="rtl">
    {{-- Back button --}}
    <div class="mb-3">
        <a href="{{ url()->previous() }}" class="btn-outline-secondary rounded-pill">
            <i class="fas fa-arrow-right ms-1"></i> شاته
        </a>
    </div>

    {{-- Poets grid --}}
    <div class="century-card p-4">
        <div class="d-flex align-items-center gap-3 mb-4">
            <i class="fas fa-feather-alt" style="font-size: 2.5rem; color: var(--adabi-gold);"></i>
            <h2 class="fw-bold" style="color: var(--adabi-dark);">ټول شاعران</h2>
        </div>

        @if($poets->count() > 0)
            <div class="poet-grid">
                @foreach ($poets as $row)
                    <div class="poet-card">
                        <img src="{{ asset('storage/' . ($row->image ?? 'front-end/images/person.png')) }}"
                             alt="{{ $row->name }}"
                             class="avatar">
                        <a href="{{ route('public.poet_details', $row->id) }}" class="name">{{ $row->name }}</a>
                    </div>
                @endforeach
            </div>
        @else
            <div class="alert alert-info text-center">
                <i class="fas fa-info-circle"></i> تر اوسه شاعران نشته.
            </div>
        @endif
    </div>

    {{-- Bottom Navigation --}}
    <nav class="bottom-nav">
        <a href="{{ url('/') }}" class="nav-item {{ request()->is('/') ? 'active' : '' }}">
            <i class="fas fa-home"></i> <span>کور</span>
        </a>
        <a href="{{ route('public.categories') }}" class="nav-item {{ request()->is('categories') || request()->is('categories*') ? 'active' : '' }}">
            <i class="fas fa-list-ul"></i> <span>کټګورۍ</span>
        </a>
        <a href="{{ route('public.poetry_search') }}" class="nav-item {{ request()->is('poetry/search') ? 'active' : '' }}">
            <i class="fas fa-search"></i> <span>لټون</span>
        </a>
    </nav>
</div>
@endsection

