{#snippet who(viewer: Status['viewer'])} {viewer ? `as ${viewer.handle ? `@${viewer.handle}` : viewer.did}` : 'signed out'} {/snippet} {#snippet row(option: Theme | null)} {@const id = option ? themeId(option) : null} {/snippet}
(shown = next)} /> {#if shown === 'preview'} (width = next)} /> {/if}
{#if chosen} {#if chosen.palette}{:else}{/if}{chosen.name} {:else} {/if}

0} aria-live="polite"> {#if problems} Not drawn: {problems === 1 ? '1 problem' : `${problems} problems`} in the editor.{entry ? ' Showing the last drawing' : ''} {:else if busy} Drawing… {:else if status?.how === 'drawn'} Drawn {:else if status} Read {:else} Not drawn yet {/if}

{#if shown === 'preview'}

{heading}

{#if handle}@{handle}{/if}
{#if entry === null && problems}

Nothing drawn yet

{:else if entry === null} {:else} oncall(call)} onreplace={(call) => oncall(call)} onaction={refuse} onopenlink={(url) => void window.open(url, '_blank', 'noopener,noreferrer')} onretry={onread} ontool={refuseTool} onupload={refuseUpload} shown={{ title: heading, handle }} /> {/if}
{:else}
{#if json} {#key shown} {/key} {:else}

{shown === 'tree' ? 'No tree: nothing drawn yet' : 'No answer: nothing read yet'}

{/if}
{/if}
{#if opened}

Opens {callSummary(opened.call.name, opened.call.args)}

{#if opened.tool} {/if}
{/if}