/**
 * @file useTableRowExpansion.tsx
 * @input React, StyleX, Icon, Table types, i18n (useTranslator)
 * @output Exports useTableRowExpansion hook + config type
 * @position Row-expansion plugin (detail panel); consumed by Table via plugins prop
 *
 * Expands a full-width detail panel below a row, rendered by the consumer's
 * `renderExpanded(item)`. For hierarchical/tree tables (child rows that reuse
 * the parent columns) use `useTableTreeData` + `useTableTreeState` instead.
 *
 * SYNC: When modified, update these files to stay in sync:
 * - /packages/core/src/Table/index.ts (exports)
 * - /packages/core/src/Table/useTableRowExpansion.doc.mjs
 */
import { type ReactNode } from 'react';
import type { TablePlugin } from '../../types';
/**
 * Configuration for useTableRowExpansion (detail-panel mode).
 *
 * The consumer owns expansion state; the plugin provides the chevron UI, the
 * full-width detail panel rendered below an expanded row, and a right-click
 * "Expand/Collapse row" action.
 */
export interface UseTableRowExpansionConfig<T extends Record<string, unknown>> {
    /** Set of currently-expanded row keys. */
    expandedKeys: Set<string>;
    /** Called with a row key when its expansion is toggled. */
    onToggle: (key: string) => void;
    /** Derive a stable unique key from a row item. */
    getRowKey: (item: T) => string;
    /**
     * Render the detail content shown in a full-width panel below the row when
     * it is expanded. Receives the row's item.
     */
    renderExpanded: (item: T) => ReactNode;
    /**
     * Control which rows are expandable. Non-expandable rows show no chevron, no
     * context-menu action, and never render a panel. @default all rows expandable
     */
    getIsItemExpandable?: (item: T) => boolean;
}
/**
 * Returns a TablePlugin that expands a full-width detail panel below a row.
 *
 * The consumer owns the `expandedKeys` set (via `useState`); the plugin adds
 * a leading chevron column, a right-click expand/collapse action, and renders
 * `renderExpanded(item)` in a full-width panel below each expanded row.
 *
 * For hierarchical data (child rows sharing the parent columns) use
 * `useTableTreeData` + `useTableTreeState` instead.
 *
 * @example
 * ```
 * const [expandedKeys, setExpandedKeys] = useState<Set<string>>(new Set());
 * const expansion = useTableRowExpansion({
 *   expandedKeys,
 *   onToggle: key =>
 *     setExpandedKeys(prev => {
 *       const next = new Set(prev);
 *       next.has(key) ? next.delete(key) : next.add(key);
 *       return next;
 *     }),
 *   getRowKey: item => item.id,
 *   renderExpanded: item => <OrderDetails order={item} />,
 * });
 * <Table data={data} columns={columns} idKey="id" plugins={{expansion}} />;
 * ```
 */
export declare function useTableRowExpansion<T extends Record<string, unknown>>(config: UseTableRowExpansionConfig<T>): TablePlugin<T>;
//# sourceMappingURL=useTableRowExpansion.d.ts.map