import { Injectable, Inject } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';

import { Observable } from 'rxjs';
import { BankInfo } from '../model/bank-info.model';
import { API_BASE_URL } from 'src/modules/common/type/injection-token.type';
import { Page } from 'src/modules/common/data/model/page';

@Injectable({
  providedIn: 'root'
})
export class BankInfoService {
  constructor(
    @Inject(API_BASE_URL) private apiBaseUrl: string,
    private httpClient: HttpClient
  ) {}

  public getBankInfos(): Observable<Page<BankInfo>> {
    return this.httpClient.get<Page<BankInfo>>(
      `${this.apiBaseUrl}/bank-info`,
      {}
    );
  }

  // public getUser(id: number): Observable<User> {
  //   return this.httpClient.get<User>(`${this.apiBaseUrl}/users/${id}`, {});
  // }
}
