openConnection(e.detail)} bind:modalOpen={addressBarModalOpen} />
{#if host && connection}
({
id,
collCount: Object.keys(connection.databases[id].collections || {}).length,
children: connection.databases[id].collections || [],
menu: [ { label: `Drop ${id}`, fn: () => dropDatabase(id) } ],
}))}
actions={[
{ icon: 'reload', fn: reload },
{ icon: '+' },
{ icon: '-' },
]}
bind:activeKey={activeDbKey}
bind:activeChildKey={activeCollKey}
on:select={e => openDatabase(e.detail)}
on:selectChild={e => openCollection(e.detail)}
/>
{/if}