export const shouldReloadElement = (intent, order) => {
  var _a, _b;
  if (((_b = (_a = order === null || order === void 0 ? void 0 : order.line_items) === null || _a === void 0 ? void 0 : _a.pagination) === null || _b === void 0 ? void 0 : _b.count) === 0)
    return false; // we need items in the cart.
  if ((intent === null || intent === void 0 ? void 0 : intent.amount) === 0 && (order === null || order === void 0 ? void 0 : order.amount_due) !== 0)
    return true;
  if ((intent === null || intent === void 0 ? void 0 : intent.amount) > 0 && (order === null || order === void 0 ? void 0 : order.amount_due) === 0)
    return true;
  return false;
};
