@props([ 'settings', 'channel', 'threaded' => false, ]) @php $eventGroups = [ 'Deployments' => [ ['key' => 'deploymentSuccess', 'label' => 'Deployment success'], ['key' => 'deploymentFailure', 'label' => 'Deployment failure'], [ 'key' => 'statusChange', 'label' => 'Container status changes', 'helper' => 'Notify when a container stops or restarts.', ], ], 'Backups' => [ ['key' => 'backupSuccess', 'label' => 'Backup success'], ['key' => 'backupFailure', 'label' => 'Backup failure'], ], 'Scheduled tasks' => [ ['key' => 'scheduledTaskSuccess', 'label' => 'Scheduled task success'], ['key' => 'scheduledTaskFailure', 'label' => 'Scheduled task failure'], ], 'Servers' => [ ['key' => 'dockerCleanupSuccess', 'label' => 'Docker cleanup success'], ['key' => 'dockerCleanupFailure', 'label' => 'Docker cleanup failure'], ['key' => 'serverDiskUsage', 'label' => 'Disk usage warning'], ['key' => 'serverReachable', 'label' => 'Server reachable'], ['key' => 'serverUnreachable', 'label' => 'Server unreachable'], ['key' => 'serverPatch', 'label' => 'Server patching'], ['key' => 'traefikOutdated', 'label' => 'Traefik proxy outdated'], ], ]; @endphp
@foreach ($eventGroups as $group => $events) @php $multiselectEvents = collect($events) ->map(fn ($event) => [ 'property' => $event['key'] . Str::studly($channel) . 'Notifications', 'label' => $event['label'], 'enabled' => (bool) data_get( $settings, Str::snake($event['key'] . '_' . $channel . '_notifications'), ), ]) ->all(); $groupId = Str::slug($channel . '-' . $group . '-events'); @endphp
@if ($threaded)
@foreach ($events as $event) @php $threadModel = Str::camel( Str::studly($channel) . 'Notifications' . Str::studly($event['key']) . 'ThreadId', ); @endphp @endforeach
@endif
@endforeach