import { CellEditHandler, CellEditValue } from '../../../types';
import { ITableColumnProps } from '../../../../table';
import { ResolvedEditableConfig } from '../types';
/**
 * Parameters for the useCellEditable hook.
 */
interface UseCellEditableParams<T extends object> {
    /** Cell edit handler containing the onSave callback */
    cellEdit: CellEditHandler<T> | undefined;
    /** Column definitions array */
    columns: ITableColumnProps<T>[] | undefined;
    /** The unique identifier for this column */
    columnId: string;
    /** The data record for the current row */
    record: T;
    /** The index of the current row */
    rowIndex: number;
    /** Whether this is the selection checkbox column */
    isSelectionColumn: boolean;
    /** Whether this is the action buttons column */
    isActionColumn: boolean;
}
/**
 * Return type for the useCellEditable hook.
 */
interface UseCellEditableReturn<T extends object> {
    /** The resolved editable configuration, or null if not editable */
    editableConfig: ResolvedEditableConfig;
    /** Whether this cell is editable */
    isCellEditable: boolean;
    /** The current cell value as a string (used by built-in editors) */
    cellValue: string;
    /**
     * The raw, untyped cell value read via the column accessor (`dataIndex`).
     * Used by the `custom` editor so it receives the real value, not a string.
     */
    rawCellValue: T[keyof T] | undefined;
    /** The column accessor key (`dataIndex`), passed to the custom editor */
    dataIndex: string;
    /** Callback to save the cell value */
    handleCellSave: (newValue: CellEditValue) => Promise<void> | void;
}
/**
 * Hook to handle cell editability logic.
 *
 * Encapsulates all editable-related state and handlers.
 * Follows Single Responsibility Principle by only handling edit-related concerns.
 *
 * @template T - The type of the data record (must extend object)
 * @param params - Parameters for editability handling
 * @returns Object containing editable state and handlers
 *
 * @example
 * ```tsx
 * const {
 *   editableConfig,
 *   isCellEditable,
 *   cellValue,
 *   handleCellSave,
 * } = useCellEditable({
 *   cellEdit: { onSave: handleSave },
 *   columns: columnDefinitions,
 *   columnId: 'name',
 *   record: { id: 1, name: 'John' },
 *   rowIndex: 0,
 *   isSelectionColumn: false,
 *   isActionColumn: false,
 * });
 * ```
 */
export default function useCellEditable<T extends object>(params: UseCellEditableParams<T>): UseCellEditableReturn<T>;
export {};
