function checkTrigger(component, trigger, row, data, form, instance) {
  // If trigger is empty, don't fire it
  if (!trigger || !trigger[trigger.type]) {
    return false;
  }

  switch (trigger.type) {
    case 'simple':
      row = getRow(component, row, instance, trigger.simple);
      return checkSimpleConditional(component, trigger.simple, row, data, instance);
    case 'javascript':
      return checkCustomConditional(component, trigger.javascript, row, data, form, 'result', false, instance);
    case 'json':
      return checkJsonConditional(component, trigger.json, row, data, form, false);
  }
  // If none of the types matched, don't fire the trigger.
  return false;
}
Test a trigger on a component.
@param {import('@formio/core').Component} component - The component to test the trigger against.
@param {import('@formio/core').LogicTrigger} trigger - The trigger configuration.
@param {import('@formio/core').DataObject} row - The contextual row data.
@param {import('@formio/core').DataObject} data - The root data object.
@param {import('@formio/core').Form} form - The form object.
@param {any} instance - The component that is performing the trigger.
@returns {boolean} - TRUE if the trigger should fire; FALSE otherwise.