{chatTitle}

{#if participants.length > 0}

{participants.map(p => p.title || 'Ukjent').join(', ')}

{/if}
{#if connected} Tilkoblet {:else} {connectionState.current} {/if}
{#if !connected}

Venter på tilkobling…

{:else if !communicationNode}

Samtale ikke funnet

Kommunikasjonsnoden med ID {communicationId} finnes ikke eller er ikke tilgjengelig.

Tilbake til mottak
{:else if messages.length === 0}

Ingen meldinger ennå. Skriv den første!

{:else}
{#each messages as msg (msg.id)} {@const own = isOwnMessage(msg)} {@const audio = isAudioNode(msg)} {@const image = isImageNode(msg)} {@const bot = isAgentMessage(msg)}
{#if !own}

{#if bot}🤖 {/if}{senderName(msg)}

{/if} {#if audio}
Talenotat
{:else if image}
{imageDescription(msg) {#if imageDescription(msg)}

{imageDescription(msg)}

{/if}
{:else}

{msg.content || ''}

{/if}

{formatTime(msg)}

{/each}
{/if}
{#if connected && accessToken && communicationNode}
{/if}