export function convertFieldsToFieldReferences(fields) {
  return fields.map(field => ({ fieldId: field.id }));
}
export function getFieldsToShow(role, config) {
  // show the mentee fields if the user role is mentor. otherwise show mentor fields
  return (role === 'mentor' ? config.metadatas.mentee : config.metadatas.mentor) || [];
}
export function getPairConfigOptionsFromOrganisationConfig(config) {
  const { subscriptionConfig } = config;
  return {
    isMentorSelectionOn: subscriptionConfig.mentorVisibilityStatus === 'showAvailableMentors',
    canMentorEndSubscription: subscriptionConfig.mentorsCanEndSubscription,
    pairLimitForMentees: config.subscriptionConfig.menteeSubscriptionLimit,
    selectionLimitForMentees: config.subscriptionConfig.menteeSelectionLimit,
  };
}
