import { HttpClient } from '@angular/common/http'; import { Injectable, inject, signal } from '@angular/core'; import { Observable, tap } from 'rxjs'; import { TenantContext } from '../../models/context/context.model'; @Injectable({ providedIn: 'root' }) export class TenantContextService { private readonly http = inject(HttpClient); readonly tenantContext = signal(null); loadTenantContext(): Observable { return this.http.get(``).pipe( tap((context) => { this.tenantContext.set(context); }) ); } clear(): void { this.tenantContext.set(null); } }