@use('App\Enums\PermissionName')

{{ __('Announcements') }}

@if ($locations->isNotEmpty()) @endif
@can(PermissionName::SendAnnouncements->value) {{ __('New announcement') }} @endcan
@if ($announcements->isEmpty())
{{ $search !== '' || $selectedType || $selectedLocationId ? __('Nothing matches') : __('Nothing sent yet') }}

{{ __('Holidays, events and notices you send land here, with who each one went to.') }}

@else
@foreach ($announcements as $announcement) @endforeach
{{ __('Announcement') }} {{ __('Day') }} {{ __('Sent to') }} {{ __('Sent by') }} {{ __('Sent') }} {{ __('Actions') }}
{{ $announcement->type->label() }} {{ $announcement->title }}
{{ str($announcement->body)->squish()->limit(90) }}
{{ $announcement->event_date?->format('D, M j, Y') ?? '—' }}
{{ $announcement->audienceLabel() }}
{{ trans_choice(':count person|:count people', $announcement->recipients_count, ['count' => $announcement->recipients_count]) }}
{{ $announcement->sender?->name ?? '—' }} {{ $announcement->sent_at->diffForHumans() }}
{{ __('View') }}
@if ($announcements->hasPages())
{{ $announcements->links() }}
@endif @endif