import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { CachingService } from "../clients/caching.service";

@Injectable({
  providedIn: "root",
})
export class StaffMemberService extends CachingService {
  constructor(private readonly http: HttpClient) {
    super("staff");
  }

  public getStaffMembers(filters = {}) {
    this.request(
      this.http.get<any>("/api/staff-members", { params: filters })
    );
    return this.getStream();
  }
}
