import { createSelector } from '@reduxjs/toolkit';
export const perPagePrincipalSelector = createSelector((state) => state.commercePagination?.principal.perPage || 0, (perPage) => perPage);
export const perPageRecommendationSelector = createSelector((state, slotId) => state.commercePagination?.recommendations[slotId]?.perPage || 0, (perPage) => perPage);
export const totalEntriesPrincipalSelector = createSelector((state) => state.commercePagination?.principal.totalEntries || 0, (totalEntries) => totalEntries);
export const totalEntriesRecommendationSelector = createSelector((state, slotId) => state.commercePagination?.recommendations[slotId]?.totalEntries || 0, (totalEntries) => totalEntries);
export const pagePrincipalSelector = createSelector((state) => state.commercePagination?.principal.page || 0, (page) => page);
export const pageRecommendationSelector = createSelector((state, slotId) => state.commercePagination?.recommendations[slotId]?.page || 0, (page) => page);
