import { Injectable } from '@angular/core';
import { HttpRequestService } from '../resources/http-request.service';
import { Observable, map } from 'rxjs';
import { ResponseDataGetTypeDocument } from 'src/app/interfaces/document-management/type-document.interface';

@Injectable({
  providedIn: 'root'
})
export class TypeDocumentsService {

  private _url: string;
  constructor( private _httpRequestService:HttpRequestService ) {
    this._url = 'document-management';
  }

  public getTypeDocuments() : Observable<ResponseDataGetTypeDocument> {
    return this._httpRequestService.getQuery(`${ this._url }/get-type-documents`).pipe(map( (data:any) => data ));
  }

}
