import { Injectable } from '@angular/core';
import { ConfigService } from '@shared/config/config.service';
import { HttpClient } from '@angular/common/http';
import { FleioApiService } from '@fleio-api/fleio-api.service';
import { Observable } from 'rxjs/internal/Observable';
import { IAccountCapabilitiesModel } from '@fleio-api/openstack/object-store/model/account-capabilities.model';

@Injectable({
  providedIn: 'root',
})
export class AccountApiService extends FleioApiService<any> {
  constructor(protected httpClient: HttpClient, protected config: ConfigService) {
    super();
    this.setEndpoint(config.getPanelApiUrl('openstack/object-store-account'));
  }

  capabilities(): Observable<IAccountCapabilitiesModel> {
    return this.getAction('capabilities');
  }
}
