/// <reference types="react" />
import * as React from 'react';
import { BaseComponent, IRenderFunction } from '../../Utilities';
import { IColumn, DetailsListLayoutMode, IColumnReorderOptions } from './DetailsList.types';
import { CollapseAllVisibility } from '../../GroupedList';
import { ITooltipHostProps } from '../../Tooltip';
import { ISelection, SelectionMode } from '../../utilities/selection/interfaces';
export interface IDetailsHeader {
    focus: () => boolean;
}
export interface IDetailsHeaderProps extends React.Props<DetailsHeader> {
    componentRef?: (component: IDetailsHeader | null) => void;
    columns: IColumn[];
    selection: ISelection;
    selectionMode: SelectionMode;
    layoutMode: DetailsListLayoutMode;
    onColumnIsSizingChanged?: (column: IColumn, isSizing: boolean) => void;
    onColumnResized?: (column: IColumn, newWidth: number, columnIndex: number) => void;
    onColumnAutoResized?: (column: IColumn, columnIndex: number) => void;
    onColumnClick?: (ev: React.MouseEvent<HTMLElement>, column: IColumn) => void;
    onColumnContextMenu?: (column: IColumn, ev: React.MouseEvent<HTMLElement>) => void;
    onRenderColumnHeaderTooltip?: IRenderFunction<ITooltipHostProps>;
    groupNestingDepth?: number;
    collapseAllVisibility?: CollapseAllVisibility;
    isAllCollapsed?: boolean;
    onToggleCollapseAll?: (isAllCollapsed: boolean) => void;
    /** ariaLabel for the entire header */
    ariaLabel?: string;
    /** ariaLabel for the header checkbox that selects or deselects everything */
    ariaLabelForSelectAllCheckbox?: string;
    ariaLabelForSelectionColumn?: string;
    selectAllVisibility?: SelectAllVisibility;
    columnReorderOptions?: IColumnReorderOptions | null;
    minimumPixelsForDrag?: number;
}
export declare enum SelectAllVisibility {
    none = 0,
    hidden = 1,
    visible = 2,
}
export interface IDetailsHeaderState {
    columnResizeDetails?: IColumnResizeDetails;
    isAllSelected?: boolean;
    isSizing?: boolean;
    groupNestingDepth?: number;
    isAllCollapsed?: boolean;
}
export interface IColumnResizeDetails {
    columnIndex: number;
    originX?: number;
    columnMinWidth: number;
}
export interface IDropHintDetails {
    originX: number;
    startX: number;
    endX: number;
    dropHintElementRef: HTMLElement;
}
export declare class DetailsHeader extends BaseComponent<IDetailsHeaderProps, IDetailsHeaderState> implements IDetailsHeader {
    static defaultProps: {
        selectAllVisibility: SelectAllVisibility;
        collapseAllVisibility: CollapseAllVisibility;
    };
    private _rootElement;
    private _rootComponent;
    private _id;
    private _draggedColumnIndex;
    private _dropHintDetails;
    private _dragDropHelper;
    private _currentDropHintIndex;
    private _subscriptionObject;
    private _onDropIndexInfo;
    constructor(props: IDetailsHeaderProps);
    componentDidMount(): void;
    componentDidUpdate(prevProps: IDetailsHeaderProps): void;
    componentWillReceiveProps(newProps: IDetailsHeaderProps): void;
    componentWillUnmount(): void;
    render(): JSX.Element;
    /** Set focus to the active thing in the focus area. */
    focus(): boolean;
    private _getHeaderDragDropOptions();
    private _updateDroppingState(newValue, event);
    private _isValidCurrentDropHintIndex();
    private _onDragOver(item, event);
    private _onDrop(item?, event?);
    private _setDraggedItemIndex(itemIndex);
    private _resetDropHints();
    private _updateDropHintElement(element, property);
    private _getDropHintPositions();
    /**
     * Based on the given cursor position, finds the nearest drop hint and updates the state to make it visible
     *
     */
    private _computeDropHintToBeShown(clientX);
    private _renderColumnDivider(columnIndex);
    private _renderColumnSizer;
    private _renderDropHint(dropHintIndex);
    private _onRenderColumnHeaderTooltip;
    /**
     * double click on the column sizer will auto ajust column width
     * to fit the longest content among current rendered rows.
     *
     * @private
     * @param {number} columnIndex (index of the column user double clicked)
     * @param {React.MouseEvent} ev (mouse double click event)
     */
    private _onSizerDoubleClick(columnIndex, ev);
    /**
     * Called when the select all toggle is clicked.
     */
    private _onSelectAllClicked;
    private _onRootMouseDown;
    private _onRootMouseMove;
    private _onRootRef;
    private _onRootKeyDown;
    /**
     * mouse move event handler in the header
     * it will set isSizing state to true when user clicked on the sizer and move the mouse.
     *
     * @private
     * @param {React.MouseEvent} ev (mouse move event)
     */
    private _onSizerMouseMove;
    private _onSizerBlur;
    /**
     * mouse up event handler in the header
     * clear the resize related state.
     * This is to ensure we can catch double click event
     *
     * @private
     * @param {React.MouseEvent} ev (mouse up event)
     */
    private _onSizerMouseUp;
    private _onSelectionChanged();
    private _onToggleCollapseAll();
}
