export class DvnDataProviderTargetGroups {
  constructor(damgaApi) {
    this.damgaApi = damgaApi;
  }
  getInitialData() {
    return this.getData();
  }
  getData() {
    if (this.list) {
      return Promise.resolve(this.list);
    }
    return new Promise((resolve) => {
      this.damgaApi.getTargetGroups().then(response => {
        this.list = response.results.sort((a, b) => a.name.localeCompare(b.name));
        resolve(this.list);
      });
    });
  }
  getQuickSearchText() {
    return '';
  }
  isQuickSearchEnabled() {
    return false;
  }
  setInitialData(_data) {
  }
  setQuickSearchText(_text) {
  }
}
