(sections = [...sections, section])}
/>
{:else if mode === 'calendar'}
{#each [['week', t('view.week')], ['month', t('view.month')]] as [value, label]}
{/each}
{:else}
onSectionDragOver(e, '')}
ondragleave={() => (overSection = null)}
ondrop={(e) => onSectionDrop(e, '')}
>
{#if sections.length && !unsectioned.length}
{t('project.noSection')}
{/if}
{#each sections as section (section.id)}
{@const tasks = open.filter((t) => t.section_id === section.id)}
onSectionDragOver(e, section.id)}
ondragleave={() => (overSection = null)}
ondrop={(e) => onSectionDrop(e, section.id)}
>
onSectionDragStart(e, section)}
ondragend={clearSectionDrag}
ondragover={(e) => onHeadDragOver(e, section)}
ondragleave={() => (overSectionEdge = null)}
ondrop={(e) => onHeadDrop(e, section)}
>
{#if renamingSection === section.id}
{:else}
{section.name}
{#if canEdit}
{/if}
{/if}
{#if !tasks.length}
{t('view.emptySection')}
{/if}
{#if canEdit}
{#if addingIn === section.id}
{:else}
{/if}
{/if}
{/each}
{#if completedView.shown && done.length}
{t('view.done')}
{#each done as task (task.id)}
{/each}
{/if}
{#if canEdit}
{#if addingSection}
{:else}
{/if}
{/if}
{#if !open.length && !sections.length}
ᚹ
{t('project.nothingHere')}
{/if}
{/if}
{#if project.role === 'viewer'}
{t('project.readOnly')}
{/if}
{#if notes.length || canEdit}
{t('notes.title')}
{#if canEdit}
{/if}
{#if !notes.length}
{t('notes.noneInProject')}
{/if}
{/if}
{:else if status === 'loading'}
{:else if status === 'denied'}
{t('project.notFound')}
{:else}
ᚹ
{t('project.loadFailed')}
{/if}