/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import { type TableProps as AntdTableProps } from 'antd';
import React from 'react';
import { type RowKey } from './utils';
/**
 * Default initial page size for `Table`. Exposed so consumers can seed their
 * controlled `pageSize` state with the same value the component would use if
 * they relied purely on the built-in pagination defaults.
 */
export declare const DEFAULT_PAGE_SIZE = 50;
/**
 * Default `pageSizeOptions` injected into the pagination config. Matches the
 * v1 settings-page table so users see the same choices across versions.
 * Consumers can override by passing their own `pageSizeOptions` in
 * `pagination`.
 */
export declare const PAGE_SIZE_OPTIONS: readonly number[];
export interface TableProps<RecordType extends object = any> extends AntdTableProps<RecordType> {
    /**
     * Required so drag-sort, hover-swap and row identity work. Accepts the same
     * shape as antd `Table.rowKey`. When passed as a function it gets the
     * record + index and must return a serializable id.
     */
    rowKey: RowKey<RecordType>;
    /**
     * Show row index (1, 2, 3, …) in the rowSelection column by default; hovering
     * a row or selecting it reveals the checkbox in the same cell. Requires
     * `rowSelection` — the index lives in the selection column. Defaults to
     * `true`.
     */
    showIndex?: boolean;
    /**
     * Enable vertical drag-and-drop row reordering. When true, rows show a drag
     * handle on the left and `onSortEnd` fires after each drop. Defaults to
     * `false`; the rest of the table behaves like a plain antd Table.
     */
    isDraggable?: boolean;
    /**
     * Called after a row is dropped onto another. Only used when `isDraggable`
     * is true. The caller persists the move (e.g. `resource.move(...)`) and
     * refreshes `dataSource` — this component does NOT mutate the data array.
     */
    onSortEnd?: (from: RecordType, to: RecordType) => void | Promise<void>;
    /**
     * Hide the drag handle entirely while still keeping `isDraggable` on. Useful
     * when the caller wants to embed `<SortHandle />` inside a custom column.
     * Defaults to `true`.
     */
    showSortHandle?: boolean;
    /**
     * Override the width of the auto-inserted handle column when `rowSelection`
     * is absent. When `rowSelection` is provided the handle is rendered inside
     * the selection column instead, so this prop is ignored.
     */
    sortHandleColumnWidth?: number;
}
/**
 * Generic v2 settings-page table primitive. Built on antd's `Table` and adds:
 *
 * - Row-index ↔ checkbox swap inside the selection column (`showIndex`,
 *   on by default): index visible at rest, checkbox shows on hover or when
 *   selected. Both elements are absolutely positioned inside the cell so
 *   they share the same center anchor and never compete for layout space.
 * - Optional vertical drag-and-drop reordering (`isDraggable`): handle is
 *   absolute-positioned in a 32px left gutter so the checkbox column stays
 *   visually centered. The drag overlay renders an `outerHTML` clone of the
 *   source `<tr>`; the index is suppressed inside the clone so the row
 *   being moved doesn't display a stale ordinal.
 *
 * Use this in place of antd `Table` for any settings-page list. When
 * `isDraggable` is false the component is a thin pass-through to antd Table
 * plus the index swap, so it is safe as the default table on any page.
 */
export declare function Table<RecordType extends object = any>(props: TableProps<RecordType>): React.JSX.Element;
export default Table;
