{ return async ({ result, update }) => { if (result.type === 'failure' && result.data) { alertStore.add( 'error', (result.data as { error?: string }).error || `Failed to ${mode} service` ); } else if (result.type === 'redirect') { alertStore.add('success', `Notification service ${mode === 'create' ? 'created' : 'updated'} successfully`); } await update(); }; }} class="space-y-6" >

Basic Settings

{#if selectedType === 'discord'} {/if}
{#if mode === 'edit'}

Service type cannot be changed after creation

{/if}

A friendly name to identify this notification service

{#if selectedType === 'discord'} {/if}

Notification Types

Select which types of notifications should be sent to this service

{#each Object.entries(groupedTypes) as [category, types]}

{category}

{#each types as type}
{/each}
{/each}
Cancel