{#if $toasts.length > 0}
(expanded = true)}
on:mousemove={() => (expanded = true)}
on:mouseleave={() => {
if (!interacting) {
expanded = false;
}
}}
on:pointerdown={() => (interacting = true)}
on:pointerup={() => (interacting = false)}
style:--front-toast-height={`${$heights[0]?.height}px`}
style:--offset={typeof offset === 'number'
? `${offset}px`
: offset || VIEWPORT_OFFSET}
style:--width={`${TOAST_WIDTH}px`}
style:--gap={`${GAP}px`}
style={$$props.style}
{...$$restProps}
>
{#each $toasts.filter((toast) => (!toast.position && index === 0) || toast.position === position) as toast, index (toast.id)}
{/each}