2023-09-25 11:01:28 +02:00
|
|
|
import { Injectable } from '@angular/core';
|
2023-10-02 13:04:48 +02:00
|
|
|
import {MatLegacyDialog as MatDialog} from "@angular/material/legacy-dialog";
|
2023-09-25 11:01:28 +02:00
|
|
|
import {LoginComponent, LoginInfoTypes} from "./auth/login/login.component";
|
|
|
|
import {Observable} from "rxjs";
|
|
|
|
|
|
|
|
@Injectable({
|
|
|
|
providedIn: 'root'
|
|
|
|
})
|
|
|
|
export class LoginDialogServiceService {
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
private dialog: MatDialog
|
|
|
|
) { }
|
|
|
|
|
|
|
|
openLoginDialog(additionalInfo : LoginInfoTypes[] = []) : Observable<any>{
|
|
|
|
const dialogRef = this.dialog.open(LoginComponent, { data: additionalInfo });
|
|
|
|
return dialogRef.afterClosed();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|