export type HandleCheckParams = { checkboxValue: boolean; checkedItemData: DataItem; name?: string; isNestedRow?: boolean; parentDataKey?: DataItem[keyof DataItem]; }; export type UseNestedRowHandleCheckParams = { newNestedRowToggle: boolean; nestedRowProps: { nestedData: { [key: string]: DataItem[]; }; showCheckboxes?: boolean; } | null; nestedDataKey: keyof DataItem | undefined; checkedBoxes: DataItem[]; data: DataItem[]; dataKey: keyof DataItem; totalRowKey: keyof DataItem; setCheckedBoxes: React.Dispatch>; setDisplayData: React.Dispatch>; setMakeCallout: React.Dispatch>; baseHandleCheck: (params: { checkboxValue: boolean; checkedItemData: DataItem; name?: string; }) => void; /** When provided, called for "select all" / "deselect all" (name === 'all' | 'allLoaded') so the table can include nested rows. */ onSelectAll?: (checkboxValue: boolean, name: string) => void; }; /** * Shared hook for cascading checkbox logic when nested rows are enabled. * Used by DesktopTable and MobileTable to avoid duplication and keep behavior in sync. * * Feature toggle behavior (no breaking changes): * - When newNestedRowToggle is OFF: every call falls through to baseHandleCheck (same as main * branch / useHandleCheck only). No cascading; UI and logic match pre–nested-row behavior. * - When newNestedRowToggle is ON: select-all, parent, and child checkbox paths run (cascading); * otherwise falls back to baseHandleCheck. */ export declare function useNestedRowHandleCheck({ newNestedRowToggle, nestedRowProps, nestedDataKey, checkedBoxes, data, dataKey, totalRowKey, setCheckedBoxes, setDisplayData, setMakeCallout, baseHandleCheck, onSelectAll, }: UseNestedRowHandleCheckParams): (params: HandleCheckParams) => void;