What is more important in choosing a research advisor? How would you weight each factor below on choosing an advisor?

1 - My interest in the advisor's research topic.

2 - How well he/she dedicates time and effort to guide me.
This is a Hobson's Choice as stated. In reality you need both. 

But in reality each of these ideas is defined by a wide range. Your interest can be a little or a lot. The more interested you are the better. But if your interest is zero it is a big mistake to choose that. 

The support provided by a professor can be a little or a lot. Even if it is "low" the needed support may be provided by others, say post-docs or senior lab researchers. But if the support is zero (in time/effort), again, it is a big mistake to choose this. Moreover, the kind of support provided by different advisors can vary widely. They can be the source of a problem that you solve, or they can be a collaborator. 

In realistic situations you need a balance. Moreover, the balance is partly determined by yourself. How wide are your interests? How flexible are you? Are you driven to a particular sub-sub-sub-field or are you willing to explore anything "interesting"? How much guidance do you need? Are you a dedicated self studier or do you need a kick to get moving in some given direction? 

Think about your own personal situation and make a choice. But zero on either of the two indices you are looking at is probably a bad choice. 



However, at the undergraduate level this is a less critical choice since you have a variety of things to do beyond research. As you are just getting started in research, it might be wiser to choose someone who will give you more help rather than less despite a low interest in the specific topic. At the doctoral level, the topic becomes more important.