<script lang="ts">
	import { onMount } from 'svelte';
	import { tsParticles } from '@tsparticles/engine';
	import { loadSlim } from '@tsparticles/slim';
	import particlesConfig from '$lib/particles-config.json';

	let container: HTMLDivElement;

	onMount(async () => {
		await loadSlim(tsParticles);

		await tsParticles.load({
			id: 'tsparticles',
			options: {
				fullScreen: {
					enable: false,
					zIndex: -1
				},
				...particlesConfig
			}
		});
	});
</script>

<div id="tsparticles" bind:this={container} class="fixed inset-0 -z-10"></div>
