{t('create.title')}

{t('create.formTitle')}

{ 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('create.typeLabel')} {t('common.required')}
{#if eventData.type === 'limited'}
{#if errors.attendee_limit}

{errors.attendee_limit}

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

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