<script>
  import { clipboard } from '@skeletonlabs/skeleton';

  let { id } = $props();
  let inviteUrl = $derived(new URL(`/invite/${id}`, document.location));
</script>

<button class="btn bg-secondary-500" use:clipboard={inviteUrl}>copy</button>
<span data-clipboard="inviteUrl">{inviteUrl}</span>
