{$i18n.t('User Preview')} {#if userName} {userName} {/if}
{#if loading}
{:else if error}
{error}
{:else if preview}
{#if preview.groups.length > 0}
{$i18n.t('Groups')}
{#each preview.groups as group}
{group.name}
{/each}

{/if}
{$i18n.t('Models')}
{#if preview.models.items.length === 0}
{$i18n.t('No models accessible')}
{:else} {#each preview.models.items as model}
{model.name}
{/each} {#if preview.models.total > preview.models.items.length}
{$i18n.t('{{count}} of {{total}} accessible', { count: preview.models.items.length, total: preview.models.total })}
{/if} {/if}

{$i18n.t('Knowledge')}
{#if preview.knowledge.items.length === 0}
{$i18n.t('No knowledge bases accessible')}
{:else} {#each preview.knowledge.items as kb}
{kb.name}
{/each} {#if preview.knowledge.total > preview.knowledge.items.length}
{$i18n.t('{{count}} of {{total}} accessible', { count: preview.knowledge.items.length, total: preview.knowledge.total })}
{/if} {/if}

{$i18n.t('Tools')}
{#if preview.tools.items.length === 0}
{$i18n.t('No tools accessible')}
{:else} {#each preview.tools.items as tool}
{tool.name}
{/each} {#if preview.tools.total > preview.tools.items.length}
{$i18n.t('{{count}} of {{total}} accessible', { count: preview.tools.items.length, total: preview.tools.total })}
{/if} {/if}
{/if}