function checkCondition(component, row, data, form, instance) {
  const { customConditional, conditional } = component;
  if (customConditional) {
    return checkCustomConditional(component, customConditional, row, data, form, 'show', true, instance);
  }
  else if (conditional && (conditional.when || _.some(conditional.conditions || [], condition => condition.component && condition.operator))) {
    row = getRow(component, row, instance);
    return checkSimpleConditional(component, conditional, row, data, instance);
  }
  else if (conditional && conditional.json) {
    return checkJsonConditional(component, conditional.json, row, data, form, true);
  }

  // Default to show.
  return true;
}
Checks the conditions for a provided component and data.
@param {import('@formio/core').Component} component - The component to check for the condition.
@param {*} row - The data within a row
@param {*} data - The full submission data.
@param {import('@formio/core').Form} form - The form object.
@param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.
@returns {boolean} - TRUE if the condition is true; FALSE otherwise.