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

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

<button
	class="border-slate-500 border-solid border-2 font-bold p-1 rounded"
	use:clipboard={inviteUrl}>Copy</button
>
<span data-clipboard="inviteUrl">{inviteUrl}</span>
