import { find, isEqual } from 'lodash';
// get the current selected option
const { pricedFulfillmentOption: selectedPricedFulfillmentOption } = cart.fulfillmentGroups[0];
// load available options for the cart
const { fulfillmentOptions } = useFetchFulfillmentOptionsForCartItems(submitting);
const pricedOptionsContainGroupOption = find(
fulfillmentOptions,
option => isEqual(option, selectedPricedFulfillmentOption)
);
if(pricedOptionsContainGroupOption) {
// the current selected option is available for the cart
// it is not required to select the new one
} else {
// force customer to select the new option
}