import { Component, OnDestroy, OnInit, inject } from '@angular/core'; import { RouterOutlet } from '@angular/router'; import { BootstrapService } from './core/services/bootstrap.service'; import { BootstrapEventService } from './core/services/bootstrap-event.service'; import { AuthService } from './core/services/auth.service'; @Component({ selector: 'app-root', standalone: true, imports: [RouterOutlet], template: ``, }) export class AppComponent implements OnInit, OnDestroy { private bootstrap = inject(BootstrapService); private auth = inject(AuthService); private readonly bootstrapEvent = inject(BootstrapEventService); async ngOnInit() { await this.bootstrap.load(); await this.auth.restoreSession(); this.bootstrapEvent.start(); } ngOnDestroy(): void { this.bootstrapEvent.stop(); } }