<div class="drafts-item">
    <div class="drafts-cover">
        @if($entry->main_image)
            <img src="{{ Storage::url($entry->main_image) }}">
        @else
            <div class="drafts-cover-placeholder">
                <i data-lucide="image" size="24"></i>
            </div>
        @endif
    </div>

    <div class="drafts-info">
        <div class="drafts-top">
            <div>
                <h3 class="drafts-title">
                    {{ $entry->complete_title }}
                </h3>
                <div class="drafts-meta">
                    <span class="badge {{ $entry->type }}">
                        {{ \App\Livewire\Database::ENTRY_TYPES[$entry->type] }}
                    </span>
                    @if( $entry->getRealPlatform() )
                        <span class="badge">{{ $entry->getRealPlatform()->name }}</span>
                    @endif
                    @if( $entry->version )
                        <span class="badge">{{ $entry->version }}</span>
                    @endif
                </div>
            </div>
            <div class="drafts-dates">
                <span>
                    <i data-lucide="pencil" size="12"></i>
                    Last edited {{ $draft->updated_at->diffForHumans() }}
                </span>
                <span>
                    <i data-lucide="calendar" size="12"></i>
                    Created {{ $draft->created_at->format('d M Y') }}
                </span>
            </div>
        </div>

        <div class="drafts-actions">
            <a href="{{ route('submit.edit', ['section' =>$entry->type, 'entry' => $entry]) }}" class="btn primary">
                <i data-lucide="pen" size="13"></i>
                Continue editing
            </a>
            <a href="{{ route('entries.show', ['section' => $entry->type, 'entry' => $entry ] ) }}" class="btn" target="_blank">
                <i data-lucide="eye" size="13"></i>
                Preview
            </a>
        </div>

    </div>
</div>
