<!--
    Component: PopoverHarness
    Test-only fixture: renders Popover with a button trigger and simple content
    exposing the close() callback.
-->
<script lang="ts">
import Popover from './Popover.svelte';

let { open = $bindable(false) }: { open?: boolean } = $props();
</script>

<Popover bind:open>
    {#snippet trigger(props)}
        <button {...props}>Open</button>
    {/snippet}
    {#snippet children({ close })}
        <div data-testid="content">
            <button onclick={close} data-testid="close">Close</button>
        </div>
    {/snippet}
</Popover>
