function setActionProperty(component, action, result, row, data, instance) {
  const property = action.property.value;

  switch (action.property.type) {
    case 'boolean': {
      const currentValue = _.get(component, property, false).toString();
      const newValue = action.state.toString();

      if (currentValue !== newValue) {
        _.set(component, property, newValue === 'true');
      }

      break;
    }
    case 'string': {
      const evalData = {
        data,
        row,
        component,
        result,
      };
      const textValue = action.property.component ? action[action.property.component] : action.text;
      const currentValue = _.get(component, property, '');
      const newValue = (instance && instance.interpolate)
        ? instance.interpolate(textValue, evalData)
        : Evaluator.interpolate(textValue, evalData);

      if (newValue !== currentValue) {
        _.set(component, property, newValue);
      }

      break;
    }
  }

  return component;
}
Sets a property on a component via an executed Logic action.
@param {import('@formio/core').Component} component - The component to set the property on.
@param {import('@formio/core').LogicAction} action - The action to perform on the component.
@param {string} result - The name of the variable in the evaulation to use as the result.
@param {import('@formio/core').DataObject} row - The contextual row data.
@param {import('@formio/core').DataObject} data - The full submission data.
@param {any} instance - The component instance.
@returns {import('@formio/core').Component} - The modified component.