{#each columns as column (column.id)} {@const tasks = tasksIn(column.id)}
onDragOver(e, column.id)} ondragleave={() => (overColumn = null)} ondrop={(e) => onDrop(e, column.id)} >
{column.name}
{tasks.length}
{#each tasks as task (task.id)}
onDragStart(e, task)} ondragend={() => (draggingId = null)} >
{/each} {#if !tasks.length}
{t('view.emptySection')}
{/if}
{/each} {#if canEdit}
{#if adding}
!name.trim() && (adding = false)} onkeydown={(e) => e.key === 'Escape' && (adding = false)} />
{:else}
{ adding = true; name = ''; }}>{t('view.addSection')}
{/if}
{/if}