<script lang="ts">
	import { page } from '$app/stores';
	import { getArtefact } from '$lib/artefact.remote';
	import Artefact from '$lib/components/Artefact.svelte';

	let uuid = $derived($page.params.artefact_uuid);
	let artefact: undefined | Artefact = $state(undefined);

	$effect(() => {
		getArtefact(uuid ?? '').then((a) => (artefact = a));
	});
</script>

{#if artefact}
	<Artefact {artefact} showAll={true} />
{/if}
