{ 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} {/if}
{#each videos as video} {#if video.type === "video"} {/if} {/each}