{ e.preventDefault(); await searchVideos(); }} >
{ // A delay before clearing the suggestions allows the user to click on a suggestion // Clicking the suggestion will trigger the blur event immediately, and the search won't happen setTimeout(() => { suggestions = { suggestions: [] }; }, 200); }} />
{#if suggestions.suggestions.length > 0}
{#each suggestions.suggestions as suggestion}
{ await suggestionClicked(e.currentTarget.innerText); }}>{@html suggestion}
{/each}
{/if}
{#each videos as video} {#if video.type === "video"}
{/if} {/each}