import { inject, Injectable } from '@angular/core';
import { Observable } from 'rxjs';

import { ApplicationConfigService } from 'app/core/config/application-config.service';
import { HttpClient, HttpResponse } from '@angular/common/http';

@Injectable({ providedIn: 'root' })
export class HomeService {
    protected http = inject(HttpClient);
  private applicationConfigService = inject(ApplicationConfigService);

  private resourceUrl = this.applicationConfigService.getEndpointFor('api/home');

  homePage(): Observable<HttpResponse<string>> {
    return this.http.get(`${this.resourceUrl}/page`, {
      observe: 'response',
      responseType: 'text'
    }) as Observable<HttpResponse<string>>;
  }

}
