{#snippet sectionHeading(title: string, depth: number)} {#if depth === 0}

{title}

{:else if depth === 1}

{title}

{:else if depth === 2}

{title}

{:else if depth === 3}

{title}

{:else if depth === 4}
{title}
{:else}
{title}
{/if} {/snippet} {#snippet contentParagraph(content: string, publicationType: string)} {#if publicationType === 'book'}

{@html content}

{:else}

{@html content}

{/if} {/snippet}
{#if orderedChildren.length === 0 || depth >= 4} {#key updateCount} {#if isEditing}
{:else} {@render contentParagraph(currentContent, publicationType)} {/if} {/key} {:else}
{#if isEditing} toggleEditing(rootId, false)} /> {:else} {@render sectionHeading(title!, depth)} {/if} {#key subtreeUpdateCount} {#each orderedChildren as id, index} {/each} {/key}
{/if} {#if allowEditing && depth > 0}
{#if hasPreviousSibling && parentId} {/if} {#if hasNextSibling && parentId} {/if} Edit
{/if}