{ if (!preview) return; if (matchesShortcut(event, "submit")) { event.preventDefault(); triggerSubmit(); } }}>
{#if preview}
{#if body.trim().length === 0}
Nothing to preview.
{:else}
{/if}
{:else}
interceptMentionKeydown?.(event) ?? false} {focus} submit={async () => triggerSubmit()} bind:value={body} {placeholder} />
(interceptMentionKeydown = handler)} /> {#if !hints.isDismissed("markdown")}
Markdown is supported
hints.dismiss("markdown")}> Hide
{/if} {/if}
{#if !collapseActions || body.trim() !== ""}
{@render leadingActions?.()} {#if !hideDiscard}
{ preview = false; close(); }}>
Discard
{/if} {#if !preview && embedUploadError}
{embedUploadError}
{/if}
{#if attachEnabled || attachDisabledReason}
Attach
{/if}
(preview = !preview)}>
{preview ? "Edit" : "Preview"}
{#if secondarySubmit}
{#if submitInProgress} Saving… {:else} {activeSubmit.caption}
{utils.modifierKey()}↵
{/if}
{#snippet toggle(onclick)}
{/snippet} {#snippet popover()}
{ activeSubmitIndex = 0; closeFocused(); }}>
{#if activeSubmitIndex === 0}
{/if}
{submitCaption}
{#if submitDescription}
{submitDescription}
{/if}
{ activeSubmitIndex = 1; closeFocused(); }}>
{#if activeSubmitIndex === 1}
{/if}
{secondarySubmit.caption}
{#if secondarySubmit.description}
{secondarySubmit.description}
{/if}
{/snippet}
{:else}
{#if submitInProgress} Saving… {:else} {submitCaption}
{utils.modifierKey()}↵
{/if}
{/if}
{/if}