{#if contextMenu}
e.stopPropagation()}> {#if $notebookIcons[contextMenu.notebook.relative_path]} {/if}
{/if} {#if trashContextMenu}
e.stopPropagation()}>
{/if} {#if deleteConfirm}
deleteConfirm = null}>
e.stopPropagation()}>

Delete "{deleteConfirm.name}"?

This notebook contains {countNotesRecursive(deleteConfirm)} note{countNotesRecursive(deleteConfirm) === 1 ? '' : 's'} that will be permanently deleted.

{/if} {#snippet notebookItem(nb: NotebookEntry, depth: number)} {@const hasChildren = nb.children.length > 0} {@const isCollapsed = $collapsedNotebooks.includes(nb.path)} {@const iconSrc = getNotebookIconSrc(nb)} {#if editingNotebook === nb.path}
{ if (e.key === 'Enter') handleRename(nb); if (e.key === 'Escape') editingNotebook = null; }} onblur={() => handleRename(nb)} />
{:else} {/if} {#if hasChildren && !isCollapsed} {#each nb.children as child (child.path)} {@render notebookItem(child, depth + 1)} {/each} {/if} {/snippet}