import { Component, inject, input } from '@angular/core';
import { IParticlesProps, NgParticlesService } from '@tsparticles/angular';
import { loadFull } from 'tsparticles';
import { NgxParticlesModule } from "@tsparticles/angular";
import { Engine } from '@tsparticles/engine';
@Component({
  selector: 'spk-particles',
  imports: [NgxParticlesModule],
  templateUrl: './spk-particles.html',
  styleUrl: './spk-particles.scss',
})
export class SpkParticles {
  id = input<string>('tsparticles');
  ngParticlesService = inject(NgParticlesService)
  options = input<IParticlesProps>()
  ngOnInit(): void {

    this.ngParticlesService.init(async (engine: Engine) => {
      await loadFull(engine); // Load core features (optional, depending on needs)
    });
  }
}
