{#snippet chartBlock(c)} {@const rows = parseCsv(c.csvData)} {@const Comp = chartComponent(c)} {#if mounted && rows.length && c.x && c.y} {/if} {/snippet} {@html ''}
{#each components as c} {#if c.type === 'navbar'} {@const bg = resolveBg(c.bg ?? c.bgColor, 'base-100')} {@const text = resolveText(c.textColor, c.bg ?? c.bgColor, 'base-100')}

{c.title}

{#each c.links ?? [] as l}{l.label}{/each}
{:else if c.type === 'hero'} {@const useCustom = !!(c.gradient || c.bgImage)} {@const bg = useCustom ? '' : resolveBg(c.bg, 'primary')} {@const text = resolveText(c.textColor, useCustom ? undefined : (c.bg ?? 'primary'), 'primary')}
{#if c.bgImage && !c.gradient} {/if}

{c.title}

{#if c.subtitle}

{c.subtitle}

{/if}
{:else if c.type === 'footer'} {@const bg = resolveBg(c.bg ?? c.bgColor, 'base-200')} {@const text = resolveText(c.textColor, c.bg ?? c.bgColor, 'base-200')}
{#each c.columns ?? [] as col}
{col.heading}

{col.text}

{/each}
{:else if c.type === 'divider'} {@const bg = resolveBg(c.bg, 'base-100')} {@const text = resolveText(c.textColor ?? c.color, c.bg, 'base-100')}
{#if c.level === 1}

{c.text}

{:else if c.level === 3}

{c.text}

{:else if c.level === 4}

{c.text}

{:else}

{c.text}

{/if}
{:else if c.type === 'paragraph'} {@const bg = resolveBg(c.bg, 'base-100')} {@const text = resolveText(c.textColor, c.bg, 'base-100')}
{@html c.content}
{:else if c.type === 'image'}
{#if c.src}{c.alt}{/if} {#if c.caption}
{c.caption}
{/if}
{:else if c.type === 'chart'}
{@render chartBlock(c)}
{:else if c.type === 'scene'} {#snippet dataLayer()} {#if c.data.kind === 'text'}

{c.data.content}

{:else if c.data.kind === 'image'} {c.data.alt} {:else if c.data.kind === 'chart'}
{@render chartBlock(c.data)}
{/if}
{/snippet} {#snippet telling()} {#each c.steps ?? [] as step}

{step.text}

{/each} {/snippet}
{/if} {/each}