import { DataUnit, Record } from '@sankhyalabs/core';
import { CellPosition, ColDef, GridApi, GridOptions } from "@ag-grid-community/core";
import { IRecordValidator } from '../../../../utils/form/interfaces';
import { ICustomEditorInfo } from '../../../../utils/customEditor/interfaces/ICustomEditorInfo';
import { ICustomRenderInfo } from '../../../../utils/customRender/interfaces/ICustomRenderInfo';
import { IInvalidCell } from '../../../../utils/validators/recordvalidator/IInvalidCells';
export default class GridEditionManager {
  private _dataUnit;
  private _lastCellClicked;
  private _lastCellEdited;
  private _lastCellOpened;
  private _targetEditionCell;
  private _recordValidationProcessor;
  private _gridOptions;
  private _useEnterLikeTab;
  private _editionIsDisabled;
  private _isGridEdition;
  private _customEditors;
  private _customRenders;
  private _enableContinuousInsert;
  private _enableGridInsert;
  private _invalidCells;
  private _nextInvalidCell;
  private _currentEditLock;
  private _lockerId;
  private _inProgressChanges;
  constructor(dataUnit: DataUnit, useEnterLikeTab: boolean, recordsValidator: IRecordValidator, editionIsDisabled: () => boolean, customEditors?: Map<string, ICustomEditorInfo>, customRenders?: Map<string, ICustomRenderInfo>, enableContinuousInsert?: boolean, enableGridInsert?: boolean, lockerId?: string);
  configureGrid(options: GridOptions): GridOptions;
  updateCurrentEditorGuiValue(updatedRowValue: Record): void;
  private lockFocusWhenAddRow;
  private handleCellEditingStartedRowAdd;
  private isSelectableRow;
  private canContinuousInsert;
  proceedAutoSave(): Promise<boolean>;
  private saveDataUnit;
  recordValidate(): Promise<void>;
  navigateByEnterKey(keyboardEvent: KeyboardEvent): void;
  getComponents(): {
    [p: string]: any;
  };
  verifyClickToEdition(api: GridApi, cellClicked: CellPosition): void;
  configureColumn(col: ColDef): ColDef;
  private getRequiredFields;
  private getFormRequiredFields;
  private saveSuccess;
  private saveFail;
  private focusOnCell;
  private onCellKeyDown;
  private processEnterKey;
  private nextEditionRow;
  private editPreviousRow;
  private editNextRow;
  private moveEditionVertically;
  private finishEdition;
  private canEdit;
  private isColEditable;
  private isTypeFile;
  private isSecondClick;
  private onCellEditRequest;
  private handlePromiseValue;
  private updateCellValue;
  setCellEditors(customEditors: Map<string, ICustomEditorInfo>): void;
  setCellRenders(customRenders: Map<string, ICustomRenderInfo>): void;
  private pushInvalidCell;
  getInvalidCells(): Array<IInvalidCell>;
  getNextInvalidCell(): IInvalidCell;
  processContinuousInsert(): Promise<void>;
  clearInvalidCells(stopEdition?: boolean): void;
  setEnableContinuousInsert(enable: boolean): void;
  hasInvalidField(fieldName: string, recordId: string): boolean;
  hasInvalidCell(): boolean;
}
