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