{ if (!preview) return; const auxiliarKey = utils.isMac() ? event.metaKey : event.ctrlKey; if (auxiliarKey && event.key === "Enter") { event.preventDefault(); void submit({ comment: body, embeds }); } }}>
{#if preview}
{#if body.trim().length === 0}
Nothing to preview.
{:else}
{/if}
{:else}
submit({ comment: body, embeds })} bind:value={body} {placeholder} /> {#if !hints.isDismissed("markdown")}
Markdown is supported
hints.dismiss("markdown")}> Hide
{/if} {/if}
{@render belowTextarea?.()} {#if !hideDiscard || body.trim() !== ""}
{#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}