{#if isMobile}
{#if $mobileView !== 'sidebar'}
{:else}
{/if}
{#if $mobileView === 'sidebar'} HelixNotes {:else if $mobileView === 'notelist'} {$activeNotebook?.name || 'All Notes'} {:else} {$activeNote?.meta.title || 'Untitled'} {/if}
{#if $mobileView === 'editor'}
($readOnly = !$readOnly)}>
{#if $readOnly}
{:else}
{/if}
{:else}
{/if}
($showInfo = true)} title="Info">
($showSettings = true)} title="Settings">
editor?.flushSave()} onNoteMoved={() => sidebar?.refresh()} />
{#if $mobileView !== 'editor'}
($mobileView = 'sidebar')}>
Notebooks
$showSearch = true}>
Search
Daily
($showSettings = true)}>
Settings
{/if}
{:else}
{#if $focusMode}
{ if (!(e.target as HTMLElement).closest('button')) appWindow.startDragging(); }}>
{$activeNote?.meta.title || 'Untitled'}
($focusMode = false)} title="Exit focus mode (Escape)">
($readOnly = !$readOnly)} title={$readOnly ? 'Switch to Edit Mode' : 'Switch to View Mode'}>
{#if $readOnly}
{:else}
{/if}
{#if !isMac}
e.stopPropagation()} onclick={() => appWindow.minimize()} title="Minimize">
e.stopPropagation()} onclick={() => appWindow.toggleMaximize()} title="Maximize">
e.stopPropagation()} onclick={() => appWindow.close()} title="Close">
{/if}
{:else}
{/if}
{#if !$focusMode}
{#if !$sidebarCollapsed}
{/if}
editor?.flushSave()} onNoteMoved={() => sidebar?.refresh()} />
{/if}
{/if}