import { Sort, SortingProvider } from '@sankhyalabs/core';
import { Filter, FilterProvider } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
import EzGridController, { EzGridColumn, EzGridColumnConfig, EzGridColumnMenuItemDef, EzGridOptions } from '../EzGridController';
import { ICustomEditorInfo } from '../../../../utils/customEditor/interfaces/ICustomEditorInfo';
import { ICustomRenderInfo } from '../../../../utils/customRender/interfaces/ICustomRenderInfo';
import { ICustomFormatter } from '../../interfaces';
import { IInvalidField } from '../../../../utils/form/interfaces';
export default class AgGridController implements EzGridController, SortingProvider, FilterProvider {
  private readonly DEFAULT_ROW_HEIGHT;
  private readonly DEFAULT_HEADER_ROW_HEIGHT;
  private readonly CHECK_BOX_COL_ID;
  private readonly STATUS_COL_ID;
  private readonly RECORD_ARCHIVE_COL_ID;
  private readonly BLOCK_LOAD_DEBOUNCE;
  private readonly DEFAULT_FONT_SIZE;
  private readonly DEFAULT_FONT_SIZE_HTML5;
  private readonly DEFAULT_ICON_SIZE;
  private readonly DEFAULT_MAX_SIZE;
  private _grid;
  private _gridOptions;
  private _columnStateChangeCallback;
  private _selectionChangeCallback;
  private _doubleClickCallBack;
  private _menuItems;
  private _multipleSelection;
  private _dataUnit;
  private _idAttribName;
  private _dataSource;
  private _colDefs;
  private _statusResolver;
  private _selectionChangeDeboucing;
  private _gridConfig;
  private _filteredColumns;
  private _filterColumn;
  private _filterColumnleftPosition;
  private _editionManager;
  private _customEditors;
  private _customRenders;
  private _customFormatters;
  private _container;
  private _options;
  private observer;
  private _gridShowDom;
  private peddingExecutionsOnGridShow;
  private _lastColsConfig;
  private _i18n;
  configFilterColumn(filterColumn: HTMLFilterColumnElement): void;
  private handleFilteredColumnsChanged;
  clearFilter(): void;
  private showFilterColumn;
  constructor(_enterprise: boolean);
  getGridConfig(): Array<EzGridColumnConfig>;
  locateColumn(columnName: string, gridElement: HTMLElement): void;
  highlightColumnHeader(columnName: string, gridElement: HTMLElement): void;
  getSort(_dataUnitName: string, defaultSorting: Array<Sort>): Array<Sort>;
  getFilter(): Array<Filter> | undefined;
  private getExpression;
  initDatagrid(container: HTMLElement, options: EzGridOptions): void;
  private processFormatterCellCallback;
  private setFilterColumnLeftPosition;
  private buildMenuItemOptions;
  private buildMenuItemOptionSort;
  private buildMenuItemFilterColumn;
  private resolveDescriptionColMetadata;
  private buildMenuItemOptionPin;
  private sortDataByColumn;
  private getRowHeight;
  private getHeaderRowHeight;
  private navigateToNextCell;
  private defineRowModelType;
  private setOptionsEvents;
  private setOptionsSupress;
  private getSelectionHeaderStatus;
  private updateSelectionForAll;
  setData(data: Array<any>): void;
  addRows(): void;
  updateRows(rows?: Array<any>): void;
  private updateRowData;
  selectAll(quietly?: boolean): void;
  selectRows(rowIds: Array<string>, quietly?: boolean): void;
  removeRows(): void;
  changeValues(changes: any, rowIds?: Array<string>): void;
  savingCanceled(fields: Array<IInvalidField>, recordId: string): void;
  refresh(scrollToSelectedRow?: boolean): void;
  private scrollToSelectedRow;
  private focusOnGridContainer;
  setFocus(): void;
  setAutoFocus(autoFocus: boolean): void;
  setEnableGridInsert(enable: boolean): void;
  setEnableContinuousInsert(enable: boolean): void;
  setFocusFirstRow(): void;
  setFocusLastRow(): void;
  startEditionOnRowByIndex(rowIndex: number): void;
  startEditionOnLastRow(): void;
  private syncSelectWithDataUnit;
  private startEdition;
  private getFirstEditableColl;
  private isColumnEditable;
  private setFocusOnRow;
  private focusByCollAndRow;
  setColumnsDef(cols: Array<EzGridColumn>): void;
  private setColsDefsWithStateIfNeeded;
  private getColsDefWithConfigApplied;
  clearRangeSelection(): void;
  hideSelectionColumn(): void;
  showSelectionColumn(): void;
  getColumnsDef(): Array<EzGridColumn>;
  setColumnsState(state: Array<EzGridColumnConfig>): void;
  private needToAddDescriptionColumn;
  getColumnsState(): Array<EzGridColumn>;
  getSelection(): Array<any>;
  addColumnMenuItem(item: EzGridColumnMenuItemDef): void;
  quickFilter(term: string): void;
  setSelectedIndex(index: number): void;
  hasFilterColumn(columnName: string): boolean;
  private buildColDef;
  private setHTMLRender;
  setCustomFormatters(customFormatters: Map<string, ICustomFormatter>): void;
  refreshSelectedRows(): void;
  private getInitCellStyle;
  private getStyleByColumn;
  private getFormatterByColumn;
  private onCallStateChange;
  private onCellClicked;
  private isElementResize;
  private isUIEvent;
  private onSelectionChange;
  private handleExecuteProceedAutosave;
  private processBuildSelectionChangeCallback;
  private handleBuildSelectionChangeWithDU;
  private buildSelectionChangeCallback;
  private onRowDoubleClick;
  private conditionalSet;
  processEditionCanceled(): void;
  setCellEditors(customEditors: Map<string, ICustomEditorInfo>): void;
  setCellRenders(customRenders: Map<string, ICustomRenderInfo>): void;
  clearInvalidCells(stopEdition?: boolean): void;
  processContinuousInsert(): void;
  destroy(): void;
  registryListeners(): void;
  resetPaginationState(): void;
  stopEdit(): void;
  private getColumnWidth;
  private getColumnWidthByLabel;
  private getCodeColFromDescriptionCol;
}
