/**
 * CSS class applied to the currently active row.
 */
export declare const ACTIVE_CLASS = "active";
/**
 * Default HTML data attribute name used to store the unique ID on table row elements.
 */
export declare const DEFAULT_DATA_ATTRIBUTE = "data-id";
export declare const DEFAULT_TABLE_CHECKBOX_CELL_CLASS = ".table-checkbox";
export declare const DEFAULT_TABLE_ACTION_CELL_CLASS = ".table-action";
/**
 * Options for the `useTableSelection` hook.
 */
export type UseTableSelectionOptions<TData extends Record<string, any>> = {
    /**
     * The array of data items to be displayed in the table.
     * The hook uses this to determine all possible row IDs for "select all" functionality.
     */
    tableData: TData[];
    /**
     * The key in `TData` objects that serves as the unique identifier for each row.
     */
    idKey: keyof TData;
    /**
     * Optional array of row IDs that should be initially selected.
     */
    initialSelectedRowIds?: string[];
    /**
     * Optional ID of the row that should be initially marked as active.
     */
    initialActiveRowId?: string;
    /**
     * Optional CSS query selector to find the checkbox input element within each table row.
     * @default '.table-checkbox input[type="checkbox"]'
     */
    checkboxQuerySelector?: string;
    /**
     * Optional name of the HTML data attribute on `<tr>` elements that holds the unique row ID.
     * @default 'data-id' (matches DEFAULT_DATA_ATTRIBUTE)
     */
    dataAttributeName?: string;
    /**
     * Optional external ref for the table element. If not provided, the hook creates its own.
     * Useful if the parent component needs direct access to the table DOM element for other purposes.
     */
    ref?: React.RefObject<HTMLTableElement>;
};
/**
 * Return value of the `useTableSelection` hook.
 */
export type UseTableSelectionReturn = {
    /**
     * React ref attached to the `<table>` HTML element.
     * Ensure this ref is assigned to your table element to enable DOM manipulations.
     */
    tableRef: React.RefObject<HTMLTableElement>;
    /**
     * An array of strings, where each string is the ID of a currently selected row.
     */
    selectedRowIds: string[];
    /**
     * The ID of the currently active row. An empty string signifies no row is active.
     */
    activeRowId: string;
    /**
     * Callback handler to be attached to the click/change event of individual row selection UI elements (e.g., checkboxes).
     * It expects the clicked element to be within a `<tr>` that has the specified `dataAttributeName`.
     * Manages the selection state of a single row.
     *
     * @param event The React mouse event from the selection UI element.
     */
    onSelection: (event: React.MouseEvent<HTMLElement>) => void;
    /**
     * Callback handler to be attached to the click event of table row (`<tr>`) elements.
     * Manages the active row state.
     * @param event The React mouse event from the `<tr>` element.
     */
    onActiveRowChange: (event: React.MouseEvent<HTMLTableRowElement>) => void;
    /**
     * Callback handler to select or deselect all rows.
     * @param shouldSelect If true, all rows in `tableData` will be selected; otherwise, all selections will be cleared.
     */
    onToggleAll: (shouldSelect: boolean) => void;
    /**
     * Function to update row selection and active highlighting. This is useful when the row data changes due to a search value
     * or any other filter.
     *
     * @returns
     */
    updateRowSelection: () => void;
    /**
     * Setter function to change selected rows from the outside in a controlled manner.
     *
     * @param rowIds
     * @returns
     */
    setSelectedRowIds: (rowIds: string[]) => void;
    /**
     * Setter function to change the active row from the outside in a controlled manner.
     * Use this to deselect an active row.
     *
     * @param activeRowId
     * @returns
     */
    setActiveRowId: (activeRowId: string | undefined) => void;
    /**
     * A boolean indicating whether at least one row is currently selected.
     */
    hasSelection: boolean;
    /**
     * A boolean indicating whether all rows in the current `tableData` are selected.
     */
    isAllSelected: boolean;
};
/**
 * A React hook to manage row selection and active row state for an HTML table,
 * including DOM manipulations for visual feedback to optimize performance by
 * preventing individual row re-renders.
 *
 * @param {UseTableSelectionOptions<TData>} options The configuration properties for the hook.
 * @returns {UseTableSelectionReturn} The state and handlers for managing table selection and active row.
 */
declare const useTableSelection: <TData extends Record<string, any>>(props: UseTableSelectionOptions<TData>) => UseTableSelectionReturn;
/**
 * Finds a table row element by its data attribute value.
 *
 * @param rows Array of HTMLTableRowElements to search within.
 * @param value The value of the data attribute to find.
 * @param attribute The name of the data attribute (e.g., 'data-id').
 * @returns The found HTMLTableRowElement or undefined.
 */
export declare const getRowByDataAttribute: (rows: HTMLTableRowElement[], value: string | null | undefined, attribute: string) => HTMLTableRowElement | undefined;
/**
 * Adds an "active" class to a specified table row.
 *
 * @param rows Array of HTMLTableRowElements to search within.
 * @param rowId The ID of the row to highlight.
 * @param dataAttributeName The data attribute used to identify the row.
 */
export declare const highlightRow: (rows: HTMLTableRowElement[], rowId: string | null, dataAttributeName: string) => void;
/**
 * Removes the "active" class from a specified table row.
 *
 * @param rows Array of HTMLTableRowElements to search within.
 * @param rowId The ID of the row to unhighlight.
 * @param dataAttributeName The data attribute used to identify the row.
 */
export declare const removeHighlightFromRow: (rows: HTMLTableRowElement[], rowId: string | null, dataAttributeName: string) => void;
/**
 * Sets the checked state of a checkbox within a specific table row.
 * @param rows Array of HTMLTableRowElements to search within.
 * @param rowId The ID of the row to target (value of dataAttribute).
 * @param dataAttribute The data attribute used to identify the row.
 * @param checkboxQuerySelector A CSS selector to find the checkbox input within the row.
 * @param isChecked The desired checked state (true for checked, false for unchecked).
 */
export declare const setRowCheckboxState: (rows: HTMLTableRowElement[], rowId: string, dataAttribute: string, checkboxQuerySelector: string, isChecked: boolean) => void;
/**
 * Marks a specific row as selected by checking its checkbox.
 */
export declare const selectRow: (rows: HTMLTableRowElement[], rowId: string, dataAttribute: string, checkboxQuerySelector: string) => void;
/**
 * Marks a specific row as deselected by unchecking its checkbox.
 */
export declare const deselectRow: (rows: HTMLTableRowElement[], rowId: string, dataAttribute: string, checkboxQuerySelector: string) => void;
export default useTableSelection;
