{#if $errors[fields[$state.context.currentField].name]} {$errors[fields[$state.context.currentField].name]} {:else} {/if} {#if fields[$state.context.currentField].type === 'text'} {:else if fields[$state.context.currentField].type === 'email'} {:else if fields[$state.context.currentField].type === 'textarea'} {:else if fields[$state.context.currentField].type === 'select'} {:else if fields[$state.context.currentField].type === 'slider'} {:else if fields[$state.context.currentField].type === 'toggle'} {:else if fields[$state.context.currentField].type === 'number'} {/if}
{#if $state.matches('submitting')}

Summary

{#each Object.entries($state.context.formData) as [key, value]}

{key}: {value}

{/each}
{/if}
{#if !$state.matches('submitting')} {/if} {#if $state.matches('submitting')} {/if}