const actions = {
    newRow(afterOptionalRowTemporaryId, type) 
    {
        return {
          type: 'rows/add',
          payload: {
            type,
            afterOptionalRowTemporaryId
          },
        };
    },

    removeRow(rowTemporaryId) 
    {
        return {
          type: 'rows/remove',
          payload: {
            rowTemporaryId
          },
        };
    },

    removeConditionOrFilter(conditionOrFilterTemporaryId, contextTemporaryID) 
    {
        return {
          type: 'rows/remove',
          payload: {
              conditionOrFilterTemporaryId,
              contextTemporaryID
          },
        };
    },

    setRows(rows, source)
    {
        return {
          type: 'rows/set',
          payload: {
            rows,
            source
          },
        };
    },
};

export default actions;