{#if tools.length} pointerWasOpen = position !== null} onclick={event => { const close = event.detail > 0 ? pointerWasOpen : position !== null; const bounds = anchor!.getBoundingClientRect(); position = close ? null : side === "right" ? { x: bounds.right + 4, y: bounds.top } : { x: bounds.left, y: bounds.bottom + 4 }; }}> {#if !compact}{label}{/if} {/if} {#if position && tools.length} position = null} />{/if} {#if error}{error} error = ""}>{$t("Dismiss")}{/if}
{error} error = ""}>{$t("Dismiss")}