{t('event.editTitle', { eventName: data.event.name })}

{t('event.editEventTitle')}

{t('event.editEventDescription')}

{ isSubmitting = true; return async ({ result, update }) => { isSubmitting = false; if (result.type === 'failure') { // Handle validation errors if (result.data?.error) { errors.server = String(result.data.error); } } update(); }; }} class="space-y-6" > {#if errors.server}
{errors.server}
{/if}
{#if errors.name}

{errors.name}

{/if}
{#if errors.date}

{errors.date}

{/if}
{#if errors.time}

{errors.time}

{/if}
{t('create.locationTypeLabel')} {t('common.required')}

{eventData.location_type === 'none' ? t('create.locationNoneDescription') : eventData.location_type === 'text' ? t('create.locationTextDescription') : t('create.locationMapsDescription')}

{#if eventData.location_type !== 'none'}
{#if eventData.location_type === 'text'} {:else} {/if} {#if errors.location}

{errors.location}

{/if} {#if errors.location_url}

{errors.location_url}

{/if}
{/if}
{t('common.type')} {t('common.required')}
{#if eventData.type === 'limited'}
{#if errors.attendee_limit}

{errors.attendee_limit}

{/if}
{/if}
{t('common.visibility')} {t('common.required')}

{eventData.visibility === 'public' ? t('create.publicDescription') : eventData.visibility === 'private' ? t('create.privateDescription') : t('create.inviteOnlyDescription')}

{#if eventData.visibility === 'invite-only' && inviteToken && data.event.userId === data.userId}

Invite Link

{t('event.inviteLinkExpiresAt', { time: new Date(inviteToken.expires_at).toLocaleString() })}

{/if}
{#if showInviteLinkToast}
{t('event.inviteLinkCopied')}
{/if}