{#snippet bulk(key: string | null, label: string)}
{/snippet} {#snippet skippedNote(key: string | null)} {#if skipped && skipped.key === key}

{i18n.plural('basket.held.skipped', skipped.n)}

{/if} {/snippet}

{t('basket.title')}

{t('basket.intro')}

{#if access && !access.open}

{t(access.reason === 'chain_off' ? 'vote.chain.off' : 'vote.members')}

{/if}
{t('basket.doc')} {@render bulk('*', t('basket.doc'))}
{@render skippedNote('*')} {#if left.length}

{i18n.plural('basket.waiting', left.length)}

{/if}
{#each all as s, i (s.key ?? `none-${i}`)} {@const label = sectionLabel(s.key)}
{#if label}

{label}

{@render bulk(s.key, label)}
{@render skippedNote(s.key)} {/if}
    {#each s.slots as slot (slot.unit.id)} {@const title = headline(slot)} {@const several = slot.versions.length > 1} {@const first = slot.versions[0] ?? slot.inertia[0] ?? slot.held[0]}
  • {#if several}

    {t('basket.versions')}

    {/if} {#each [...slot.versions, ...slot.inertia] as v (v.id)}
    {labelOf(v, slot)} {t('tally.short', { for: v.tally.for, against: v.tally.against })} {#if v.myVote && !v.myVoteStale} · {t('basket.mine', { choice: t(`vote.choice.${v.myVote}`) })}{/if} basket.pick(v.id, c)} />
    {/each} {#each slot.held as v (v.id)}
    {labelOf(v, slot)} {t('tally.short', { for: v.tally.for, against: v.tally.against })} {#if v.myVote && !v.myVoteStale} · {t('basket.mine', { choice: t(`vote.choice.${v.myVote}`) })}{/if} {t('basket.held')} 1 ? `${title} — ${labelOf(v, slot)}` : title })} disabled={!open} onpick={(c) => basket.pick(v.id, c)} />
    {/each}
  • {/each}
{/each}