import { CommonModule } from "@angular/common";
import { Component, HostListener } from "@angular/core";
import { RouterOutlet } from "@angular/router";

/**
 *
 */
@Component({
  selector: "app-root",
  standalone: true,
  imports: [CommonModule, RouterOutlet],
  templateUrl: "./app.component.html",
  styleUrl: "./app.component.css"
})
export class AppComponent {
  title = "nhcarrigan";
  glowX = 0;
  glowY = 0;
  display = "none";

  /**
   * Moves the sun when the mouse moves.
   *
   * @param {MouseEvent} e The mouse event.
   */
  @HostListener("document:mousemove", ["$event"])
  onMouseMove(e: MouseEvent) {
    this.display = "block";
    this.glowX = e.clientX - 125;
    this.glowY = e.clientY - 125;
  }

  /**
   * Hides the sun when the mouse leaves.
   */
  @HostListener("document:mouseout", ["$event"])
  onMouseOut() {
    this.display = "none";
  }
}
