---
type Props = {
  class?: string;
};

const { class: cls }: Props = Astro.props;
---

<div id="tsparticles" class={cls}></div>

<script>
  // pnpm i @tsparticles/{engine,basic,move-parallax,interaction-particles-links}
  // Make sure to import your options here
  import { options } from "@/scripts/particles";
  import { tsParticles } from "@tsparticles/engine";
  import { loadBasic } from "@tsparticles/basic";
  import { loadParallaxMover } from "@tsparticles/move-parallax";
  import { loadParticlesLinksInteraction } from "@tsparticles/interaction-particles-links";

  (async () => {
    await loadBasic(tsParticles);
    await loadParallaxMover(tsParticles);
    await loadParticlesLinksInteraction(tsParticles);
    await tsParticles.load({ id: "tsparticles", options: options });
  })();
</script>
