@php
$availableActions = array_column($items, 'action');
$hasView = !empty(array_intersect(['View', 'ViewAny'], $availableActions)) || in_array($resource, $availableActions);
$hasCreate = in_array('Create', $availableActions);
$hasUpdate = !empty(array_intersect(['Update', 'Restore', 'RestoreAny', 'Replicate', 'Reorder'], $availableActions));
$hasDelete = !empty(array_intersect(['Delete', 'DeleteAny', 'ForceDelete', 'ForceDeleteAny'], $availableActions));
@endphp
@if($hasView)
@endif
@if($hasCreate)
@endif
@if($hasUpdate)
@endif
@if($hasDelete)
@endif
@foreach($items as $item)
@endforeach