export default function createTableSelector(tableReduxKey, nameSpace) {
  return {
    dataSelector: (state) => state[nameSpace][tableReduxKey].data,
    pageSelector: (state) => state[nameSpace][tableReduxKey].page,
    pageSizeSelector: (state) => state[nameSpace][tableReduxKey].pageSize,
    totalCountSelector: (state) => state[nameSpace][tableReduxKey].totalCount,
    allRecordsCountSelector: (state) => state[nameSpace][tableReduxKey].allRecordsCount,
    sortBySelector: (state) => state[nameSpace][tableReduxKey].sortBy,
    sortOrderSelector: (state) => state[nameSpace][tableReduxKey].sortOrder,
    selectedSelector: (state) => state[nameSpace][tableReduxKey].selected,
    isLoadingSelector: (state) => state[nameSpace][tableReduxKey].isLoading,
  };
}
