import { IServerSideDatasource, IServerSideGetRowsParams } from "@ag-grid-community/core";
import { DataUnit, QuickFilter } from '@sankhyalabs/core';
import EzGridController, { EzGridColumn, EzGridOptions } from "../EzGridController";
export default class DataSource implements IServerSideDatasource {
  private _controller;
  private _dataUnit;
  private _options;
  private _lastLoadingParams;
  private _waitingForLoad;
  private _resolveLoading;
  quickFilter: QuickFilter;
  readonly RECORD_ARCHIVE = "__RECORD_ARCHIVE__";
  private duObserver;
  private handleDataSaved;
  private handleEditionCanceled;
  private handleSavingCanceled;
  private handleDataChanged;
  private createRecordIdList;
  /**
   *  Nesse ponto, o registro já se encontra atualizado no DU,
   *  basta então passar seu valor para que a garde possa atualizar sua linha.
  */
  private updateGridRowNodes;
  private getRecordById;
  /**
   * Em caso de necessidade de reload (isWaitingToReload), eh preciso chamar o dataUnit.gotoPage, pois ele aplica tambem a ordenacao dos registros,
   * enquanto que o _controller.refresh apenas recarrega os dados na ordem que atua.
   */
  private handleRefreshOrReload;
  private handleReload;
  private handleRefresh;
  private handleRecordsAdded;
  private focusOnNewRecord;
  private updateLoadedRecords;
  private handleFocusFirstRow;
  private isSilentChange;
  constructor(dataUnit: DataUnit, controller: EzGridController, options: EzGridOptions, resolveLoading?: any);
  private updateSelection;
  setAutoFocus(autoFocus: boolean): void;
  setEnableGridInsert(enable: boolean): void;
  getRows(params: IServerSideGetRowsParams): void;
  needReload(currentLoading: IServerSideGetRowsParams): boolean;
  private callbackGetRows;
  destroy(): void;
  registryListeners(): void;
  private getDescriptionField;
  buildColumnDefs(): Array<EzGridColumn>;
  private buildDescriptionColumn;
}
