{{-- Header --}}

{{ __('webhooks::webhooks.system_webhooks') }}

{{ __('webhooks::webhooks.system_webhooks_description') }}

{{-- Webhooks List --}}
@if($webhooks->isEmpty())

{{ __('webhooks::webhooks.no_webhooks') }}

{{ __('webhooks::webhooks.no_webhooks_description') }}

@else
@foreach($webhooks as $webhook) @endforeach
{{ __('webhooks::webhooks.name') }} {{ __('webhooks::webhooks.target_url') }} {{ __('webhooks::webhooks.status') }} {{ __('webhooks::webhooks.subscribed_events') }} {{ __('webhooks::webhooks.actions') }}
{{ $webhook->name }}
@if($webhook->description)
{{ $webhook->description }}
@endif
{{ $webhook->target_url }} @if(empty($webhook->subscribed_events)) {{ __('webhooks::webhooks.all_events') }} @else {{ count($webhook->subscribed_events) }} {{ __('webhooks::webhooks.event') }} @endif
{{ $webhooks->links() }}
@endif
{{-- Recent Deliveries --}}

{{ __('webhooks::webhooks.recent_deliveries') }}

{{ __('webhooks::webhooks.latest_count', ['count' => 10]) }}
@if($recentDeliveries->isEmpty())

{{ __('webhooks::webhooks.no_deliveries') }}

@else
@foreach($recentDeliveries as $delivery) @endforeach
{{ __('webhooks::webhooks.event') }} {{ __('webhooks::webhooks.restaurant') }} {{ __('webhooks::webhooks.status') }} {{ __('webhooks::webhooks.response') }} {{ __('webhooks::webhooks.created_at') }}
{{ $delivery->event }} {{ $delivery->restaurant_id ?? '—' }} {{ __('webhooks::webhooks.status_' . $delivery->status) }} @if($delivery->response_code) {{ $delivery->response_code }} @else @endif {{ $delivery->created_at->diffForHumans() }}
@endif
{{-- Create Modal --}} @if($showCreateModal) @endif {{-- Edit Modal --}} @if($showEditModal) @endif {{-- Delete Confirmation Modal --}} @if($showDeleteModal) @endif