import { Component } from '@angular/core';
import { Router, RouterOutlet } from '@angular/router';
import { OAuthService } from 'angular-oauth2-oidc';

@Component({
  selector: 'app-root',
  imports: [RouterOutlet],
  providers: [
    OAuthService,
  ],
  templateUrl: './app.component.html'
})
export class AppComponent {
  title = 'Digitálny asistent PAS';
  constructor(private readonly as: OAuthService, private readonly router: Router) {
    this.as.configure({
      issuer: 'https://accounts.google.com',
      redirectUri: window.location.origin + '/login',
      clientId: '1000025801082-09ikmt61a9c9vbdjhpdab9b0ui3vdnij.apps.googleusercontent.com',
      dummyClientSecret: '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',
      scope: 'openid profile email',
      responseType: 'code',
      strictDiscoveryDocumentValidation: false,
      timeoutFactor: 0.01,
    });
  }
}
