import { type EditTargetSnapshot, type RemoveTargetSnapshot } from './editor-snapshot.js'; import type { Api } from 'datatables.net'; /** * Internal Edit capture retaining the live row reference used for identity. */ export interface EditTargetCapture { /** Public immutable snapshot. */ readonly snapshot: EditTargetSnapshot; /** Live object identity held by DataTables at capture time. */ readonly sourceRow: TRow; } /** * Internal Remove capture retaining live row references used for identity. */ export interface RemoveTargetCapture { /** Public immutable snapshot. */ readonly snapshot: RemoveTargetSnapshot; /** Live object identities aligned with the public snapshot. */ readonly sourceRows: readonly TRow[]; } /** * Captures one row through its already validated DataTables index. * * @param table - Public DataTables API. * @param rowIndex - Exactly one resolved row index. * @param targetUnavailableMessage - Localized safe failure text. * @returns Immutable snapshot and internal source identity. */ export declare function captureEditTarget(table: Api, rowIndex: number, targetUnavailableMessage: string): EditTargetCapture; /** Captures one row when its optional public id was validated during enumeration. */ export declare function captureEditTargetWithValidatedRowId(table: Api, rowIndex: number, rowId: string | undefined, targetUnavailableMessage: string): EditTargetCapture; /** * Captures every row through validated DataTables indexes. * * @param table - Public DataTables API. * @param rowIndexes - One or more distinct resolved row indexes. * @param targetUnavailableMessage - Localized safe failure text. * @returns Immutable snapshot and aligned internal source identities. */ export declare function captureRemoveTargets(table: Api, rowIndexes: readonly number[], targetUnavailableMessage: string): RemoveTargetCapture; /** * Resolves an Edit target without consulting current selection. * * Row id is authoritative. A connected owned node is the next choice, and the * captured index is accepted only when the exact live row object still * occupies that index. * * @param table - Public DataTables API. * @param tableElement - Table element owned by the editor. * @param capture - Snapshot and live source identity. * @param targetUnavailableMessage - Localized safe failure text. * @returns Current DataTables row index for the captured target. */ export declare function resolveEditTarget(table: Api, tableElement: HTMLTableElement, capture: EditTargetCapture, targetUnavailableMessage: string, rowIndexById?: ReadonlyMap): number; /** * Resolves every Remove target atomically without consulting current selection. * * @param table - Public DataTables API. * @param tableElement - Table element owned by the editor. * @param capture - Aligned snapshots and live source identities. * @param targetUnavailableMessage - Localized safe failure text. * @returns Current distinct DataTables indexes for all captured rows. * @throws EditorTargetUnavailableError when any target is stale or duplicated. */ export declare function resolveRemoveTargets(table: Api, tableElement: HTMLTableElement, capture: RemoveTargetCapture, targetUnavailableMessage: string): readonly number[];