import Emitter, { IEmitter } from '../Emitter';
import { IPageContentLink, IPageContentCell, IPageContentCellIndex } from '../Page/Content';
import { IActionsButton } from '../Actions/Buttons';
import { IGridPage } from './GridPage';
import { IActionsStyleConditionStyle } from '../Actions/Styles';
import { IGridEvents } from './GridEvents';
import { IGridSelection } from './Grid';
export interface IGridCellDataset {
    x: number;
    y: number;
    width: number;
    height: number;
    overflow: number;
    row: number;
    col: number;
    [key: string]: any;
}
export interface IGridContentCellPosition {
    row: number;
    col: number;
    [key: string]: number;
}
export interface IGridCellEvent {
    evt: any;
    cell: IGridCell;
    value: string;
    done: boolean;
    checked: boolean;
    data?: any;
}
export interface IGridCellDetails {
    content: IPageContentCell;
    row: number;
    col: number;
    position: IGridContentCellPosition;
    index: IGridContentCellPosition;
    dataset: IGridCellDataset;
    reference: string;
    button: IActionsButton | null;
    link: IPageContentLink | undefined;
    history: boolean;
    checked: boolean;
    sticky: boolean;
}
export interface IGridCell extends IEmitter {
    Page: IGridPage;
    Events: IGridEvents;
    row: number;
    rowIndex: number;
    col: number;
    initialized: boolean;
    created: boolean;
    cell: HTMLDivElement;
    cellPopper: HTMLDivElement;
    dataset: IGridCellDataset;
    button: IActionsButton | null;
    style: IActionsStyleConditionStyle | null;
    reference: string;
    checked: boolean;
    hasHistory: boolean;
    content: IPageContentCell;
    input: HTMLInputElement;
    editing: boolean;
    isButton: boolean;
    hasButtonOptions: boolean;
    canEditButton: boolean;
    isImage: boolean;
    hidden: boolean;
    permission: string;
    position: IPageContentCellIndex;
    index: IGridContentCellPosition;
    type: string;
    found: boolean;
    sticky: boolean;
    update(force?: boolean): void;
    updateSoftMerge(cols?: number[], direction?: string, zIndex?: number): void;
    updateMergeWidth(scrollLeft: number, freezeColWidth?: number): void;
    setData(): void;
    setFreeze(n: boolean): void;
    setSelected(selection: IGridSelection): void;
    setButton(button: IActionsButton | null): void;
    setStyle(style: IActionsStyleConditionStyle | null): void;
    setPermission(permission: string): void;
    setSorting(direction: string): void;
    setFound(n: boolean): void;
    highlight(show?: number, hide?: number): void;
    history(n: boolean, user?: number): void;
    getDetails(): IGridCellDetails;
    getFlattenStyles(only?: string[]): string;
    getInputStyles(): string;
    cancel(restore?: boolean): void;
    selectOption(direction: string): boolean;
    openOptions(): void;
    onButton(): boolean;
}
export declare class GridCell extends Emitter implements IGridCell {
    Page: IGridPage;
    Events: IGridEvents;
    row: number;
    col: number;
    type: string;
    created: boolean;
    initialized: boolean;
    selected: boolean;
    found: boolean;
    dataset: IGridCellDataset;
    button: IActionsButton | null;
    link: IPageContentLink | null;
    style: IActionsStyleConditionStyle | null;
    reference: string;
    checked: boolean;
    hasHistory: boolean;
    isButton: boolean;
    hasButtonOptions: boolean;
    canEditButton: boolean;
    isImage: boolean;
    hidden: boolean;
    permission: string;
    position: IPageContentCellIndex;
    index: IGridContentCellPosition;
    cell: HTMLDivElement;
    cellImage: HTMLImageElement;
    cellBackground: HTMLDivElement;
    cellBackgroundHighlight: HTMLDivElement;
    private cellHistory;
    cellBorders: HTMLDivElement;
    cellTextContainer: HTMLDivElement;
    cellText: HTMLDivElement;
    cellCheckbox: HTMLDivElement;
    cellPopper: HTMLDivElement;
    input: HTMLInputElement;
    editing: boolean;
    content: IPageContentCell;
    private borders;
    private cellStyles;
    private highlightTimer;
    private oldValue;
    private _rowIndex;
    private buttonPopper;
    private selectedOption;
    private done;
    private editValue;
    private historyUser;
    private mergedCells;
    private mergeWidth;
    private _sticky;
    constructor(Page: IGridPage, Events: IGridEvents, row: number, col: number);
    rowIndex: number;
    sticky: boolean;
    private create;
    setData(): void;
    private init;
    private refresh;
    update(force?: boolean): void;
    getDetails(): IGridCellDetails;
    getFlattenStyles(only?: string[]): string;
    setFreeze(n: boolean): void;
    setSelected(selection: IGridSelection): void;
    setButton(button: IActionsButton | null): void;
    setFound(n: boolean): void;
    setStyle(style: IActionsStyleConditionStyle | null): void;
    setPermission(permission: string): void;
    setSorting(direction: string): void;
    highlight(show?: number, hide?: number): void;
    history(n: boolean, user?: number): void;
    cancel(restore?: boolean): void;
    onButton(): boolean;
    selectOption(key: string): boolean;
    openOptions(): void;
    toggleCheckbox(n?: boolean): any;
    getInputStyles(): string;
    updateSoftMerge(cols?: number[], direction?: string, zIndex?: number): void;
    updateMergeWidth(scrollLeft: number, freezeColWidth?: number): void;
    private applyBorders;
    private applyText;
    private applySoftMerge;
    private applyButton;
    private destroyPopper;
    private updateSelectOptions;
    private onWindowClick;
    private setSelectOption;
}
