import { IPageContentCell, IPageContentLink } from '../Page/Content';
import Emitter, { IEmitter } from '../Emitter';
import { IActionsButton } from '../Actions/Buttons';
import { IActionsStyleConditionStyle } from '../Actions/Styles';
import { IGridPageContentCell } from './Grid';
export interface IGridCellParamsMergedCells {
    cells: number[];
    last: number[];
}
export interface IGridCellParams {
    content: IGridPageContentCell;
    rowIndex: number;
    colIndex: number;
    row: any;
    mergeEl: HTMLDivElement;
    x: number;
    y: number;
    zIndexRow: number;
    zIndexCol: number;
    total: number;
    mergedCells: IGridCellParamsMergedCells;
}
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 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;
}
export interface IGridCell extends IEmitter {
    VALUE: string;
    DONE: string;
    CANCEL: string;
    STOP: string;
    CHECKED: string;
    init: boolean;
    type: string;
    row: number;
    col: number;
    button: IActionsButton | null;
    style: IActionsStyleConditionStyle | null;
    cell: HTMLDivElement;
    cellImage: HTMLImageElement;
    cellBorders: HTMLDivElement;
    cellPopper: HTMLDivElement;
    dataset: IGridCellDataset;
    freeze: string;
    permission: string;
    params: IGridCellParams;
    position: IGridContentCellPosition;
    index: IGridContentCellPosition;
    reference: string;
    hasHistory: boolean;
    isButton: boolean;
    hasButtonOptions: boolean;
    canEditButton: boolean;
    isImage: boolean;
    hidden: boolean;
    input: HTMLInputElement;
    checked: boolean;
    renderer: any;
    create(): void;
    update(content: IPageContentCell): void;
    edit(value?: string, touch?: boolean): void;
    cancel(clear?: boolean): void;
    setFreeze(which: string, cell?: IGridCell, cell2?: IGridCell): void;
    selected(n: boolean, sides?: string[]): void;
    highlight(): void;
    history(n: boolean, user?: number): void;
    updateSoftMerge(hiddenColumns?: number[]): void;
    onButton(): boolean;
    setSize(which: string, size: number): void;
    setButton(button: IActionsButton | null): void;
    setStyle(style: IActionsStyleConditionStyle | null): void;
    setPermission(permission: string): void;
    setOffset(size: number, which?: string): void;
    setXPosition(pos: number, move?: boolean): void;
    setYPosition(pos: number, move?: boolean): void;
    setSorting(direction: string): void;
    setRowIndex(row: number, y: number): void;
    toggleCheckbox(): void;
    getDetails(): IGridCellDetails;
    getFlattenStyles(only?: string[]): string;
    getValue(): any;
    getRawValue(): any;
    setFound(n: boolean): void;
    openOptions(): void;
    selectOption(direction: string): boolean;
}
export declare class GridCell extends Emitter implements IGridCell {
    params: IGridCellParams;
    readonly VALUE: string;
    readonly DONE: string;
    readonly CANCEL: string;
    readonly STOP: string;
    readonly CHECKED: string;
    private borders;
    private inputStyles;
    private textStyles;
    private cellStyles;
    init: boolean;
    type: string;
    cell: HTMLDivElement;
    cellImage: HTMLImageElement;
    cellBackground: HTMLDivElement;
    cellBackgroundHighlight: HTMLDivElement;
    private cellHistory;
    cellBorders: HTMLDivElement;
    cellBordersOffset: HTMLDivElement;
    cellTextContainer: HTMLDivElement;
    cellText: HTMLDivElement;
    cellCheckbox: HTMLDivElement;
    cellPopper: HTMLDivElement;
    dataset: IGridCellDataset;
    freeze: string;
    permission: string;
    reference: string;
    position: IGridContentCellPosition;
    index: IGridContentCellPosition;
    hasHistory: boolean;
    isButton: boolean;
    hasButtonOptions: boolean;
    canEditButton: boolean;
    button: IActionsButton | null;
    link: IPageContentLink | null;
    style: IActionsStyleConditionStyle | null;
    isImage: boolean;
    hidden: boolean;
    row: number;
    col: number;
    checked: boolean;
    private highlightTimer;
    input: HTMLInputElement;
    private oldValue;
    private borderStyles;
    private mergedCells;
    private buttonPopper;
    private selectedOption;
    constructor(params: IGridCellParams);
    create(): void;
    update(content: IGridPageContentCell): void;
    refresh(): void;
    renderer(): void;
    setButton(button: IActionsButton | null): void;
    setFound(n: boolean): void;
    setStyle(style: IActionsStyleConditionStyle | null): void;
    setPermission(permission: string): void;
    setSorting(direction: string): void;
    setRowIndex(row: number, y: number): void;
    edit(value?: string, touch?: boolean): void;
    onButton(): boolean;
    cancel(restore?: boolean): void;
    selected(n: boolean, sides?: string[]): void;
    setFreeze(which: string, cell?: IGridCell, cell2?: IGridCell): void;
    highlight(show?: number, hide?: number): void;
    history(n: boolean, user?: number): void;
    updateSoftMerge(hiddenColumns?: number[]): void;
    setSize(which: string, size: number): void;
    setOffset(offset: number, which: string): void;
    setXPosition(position: number, move?: boolean): void;
    setYPosition(position: number, move?: boolean): void;
    getDetails(): IGridCellDetails;
    getFlattenStyles(only?: string[]): string;
    getValue(): any;
    getRawValue(): any;
    openOptions(): void;
    toggleCheckbox(n?: boolean): any;
    selectOption(key: string): boolean;
    private updateSelectOptions;
    private setSelectOption;
    private appendChildren;
    private getDataset;
    private applyBorders;
    private applyText;
    private applyButton;
    private destroyPopper;
    private transformStyle;
    private onWindowClick;
}
