@extends('layouts.app')

@section('page-title', "My Drafts - " . config('app.name'))

@section('content')
    {{ \Diglactic\Breadcrumbs\Breadcrumbs::render() }}
    <div class="page-title">
        My Drafts
    </div>
    @if($drafts->isEmpty())
        <div class="drafts-empty">
            <i data-lucide="pen" size="48"></i>
            <p>No drafts here</p>
        </div>
    @else
        <div class="drafts-count">
            <span>{{ $drafts->total() }} draft{{ $drafts->total() > 1 ? 's' : '' }}</span>
        </div>
        <div class="drafts-list">
            @foreach($newsDrafts as $draft)
                @include('news.draft_item', ['news' => $draft])
            @endforeach
            @foreach($drafts as $draft)
                @include('entries.draft_item', ['entry' => $draft])
            @endforeach
        </div>
        {{ $drafts->links() }}
    @endif
@endsection
