import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { DataSourceValue } from '../models/data-source-value';

@Injectable({
  providedIn: 'root',
})
export class SelectBoxDataSourceService {
  constructor(private readonly http: HttpClient) {}

  getDataSourceValues(dataSourceUrl: string): Observable<DataSourceValue[]> {
    return this.http.get<DataSourceValue[]>(`${dataSourceUrl}`);
  }
}
