{#snippet sectionHeading(title: string, depth: number)} {@const headingLevel = Math.min(depth + 1, 6)} {@const className = $pharosInstance.isFloatingTitle(rootId) ? 'discrete' : 'h-leather'} {title} {/snippet} {#snippet contentParagraph(content: string, publicationType: string)} {#if publicationType === 'novel'}

{@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}