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;
    option?: string;
}
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;
    permission: string;
}
export interface IGridCellBorderWidths {
    t: number;
    r: number;
    b: number;
    l: number;
}
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;
    mapValue: any;
    cellText: HTMLDivElement;
    cellMap: HTMLDivElement | null;
    remove(): void;
    update(force?: boolean, create?: 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;
    getBorderWidths(): IGridCellBorderWidths;
    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;
    private _mapValue;
    cell: HTMLDivElement;
    cellImage: HTMLImageElement;
    cellBackground: HTMLDivElement;
    cellBackgroundHighlight: HTMLDivElement;
    private cellHistory;
    cellMap: HTMLDivElement | null;
    cellBorders: HTMLDivElement;
    cellTextContainer: HTMLDivElement;
    cellText: HTMLDivElement;
    cellCheckbox: HTMLDivElement;
    cellFilterInput: HTMLInputElement;
    cellFilterDropdown: 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;
    private _timer;
    constructor(Page: IGridPage, Events: IGridEvents, row: number, col: number);
    get mapValue(): any;
    set mapValue(n: any);
    get rowIndex(): number;
    set rowIndex(n: number);
    get sticky(): boolean;
    set sticky(n: boolean);
    private create;
    setData(): void;
    private init;
    private refresh;
    remove(): void;
    update(force?: boolean, create?: boolean): void;
    getDetails(): IGridCellDetails;
    getBorderWidths(): IGridCellBorderWidths;
    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;
    map(n: boolean): 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;
}
