import { DataUnit, LoadDataRequest, LoadDataResponse, Record, Sort } from "@sankhyalabs/core";
import { IMultiSelectionOption } from "@sankhyalabs/ezui/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionOption";
export default class PreloadManager {
  static applicationResourceID: string;
  private static _repositories;
  private static _loadingStatus;
  static setLoadingStatus(dataUnit: DataUnit, loadingInProgress: boolean): void;
  static isCacheEnabled(_dataUnit: DataUnit): boolean;
  static cacheRecords(dataUnit: DataUnit, records: Array<Record>, resetDatabase: boolean, loadingInProgress: boolean): void;
  static getSortingFunction(dataUnit: DataUnit, sorting?: Array<Sort>): (recordA: Record, recordB: Record) => number;
  static getDistinct(dataUnit: DataUnit, fieldName: string, onlyLabel?: boolean): Promise<Array<IMultiSelectionOption>>;
  private static compileDistinctByLabel;
  static loadData(dataUnit: DataUnit, request: LoadDataRequest, loadFromServer: DataLoader): Promise<LoadDataResponse>;
  static insertRecords(dataUnit: DataUnit, reference: Record, records: Array<Record>): void;
  static updateRecords(dataUnit: DataUnit, records: Array<Record>): void;
  static removeRecords(dataUnit: DataUnit, records: Array<Record>): void;
  static countRecords(dataUnit: DataUnit): Promise<number>;
  private static getRepository;
  private static loadFromCache;
  static getCachedRecords(dataUnit: DataUnit): Array<Record>;
}
export interface DataLoader {
  (dataUnit: DataUnit, request: LoadDataRequest): Promise<LoadDataResponse>;
}
