import { Component, OnInit } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { ToolbarComponent } from './components/toolbar/toolbar.component';
import { ThemeService } from './services/theme.service';
import { ChallengeWebSocketService } from './services/challenge-websocket.service';

@Component({
  selector: 'app-root',
  imports: [RouterOutlet, ToolbarComponent],
  templateUrl: './app.html',
  styleUrl: './app.css'
})
export class App implements OnInit {
  constructor(
    private readonly themeService: ThemeService,
    private readonly challengeWs: ChallengeWebSocketService
  ) { }

  ngOnInit(): void {
    this.themeService.initTheme();
    this.challengeWs.connect();
  }
}
