<div>
    @php
        $translation = $post->translations->first();
        $isPublished = $translation ? ($translation->from <= now() && ($translation->till === null || $translation->till > now())) : false;
    @endphp

    @usercan('manage posts')
        @profile('admin')
            <div class="text-xs lg:text-sm mb-6 text-theme-danger-dark flex items-center justify-end gap-2">
                @if (!$isPublished)
                    <span>{{ __('This post is not published.') }}</span>
                @endif
                <a href="{{ route('posts.manage', ['search' => $post->id, 'postTypeFilter' => '']) }}" class="text-theme-danger-dark hover:text-theme-danger">
                    <x-icon name="pencil-square" class="w-5 h-5" />
                </a>
            </div>
        @endprofile
    @endusercan
</div>