In 2001, Switzerland, with Hingis and Roger Federer on its team, won the Hopman Cup. Hingis didn't drop a set in any of her singles matches during the event, defeating Tamarine Tanasugarn, Nicole Pratt, Amanda Coetzer, and Monica Seles. Federer was later quoted as saying: "I learned a lot from her, especially the two years I was here - once as a hitting partner and once as a partner with Martina. Definitely she helped me to become the player I am today."  Hingis reached her fifth consecutive Australian Open final in 2001, defeating both of the Williams sisters en route, before losing to Jennifer Capriati. She briefly ended her coaching relationship with her mother Melanie early in the year but had a change of heart two months later just before the French Open. 2001 was her least successful year in several seasons, with only three tournament victories in total. She lost her No. 1 ranking for the last time (to Jennifer Capriati) on 14 October 2001. In that same month, Hingis underwent surgery on her right ankle.  Coming back from injury, Hingis won the Australian Open doubles final at the start of 2002 (again teaming with Anna Kournikova) and reached a sixth straight Australian Open final in singles, again facing Capriati. Hingis led by a set and 4-0 and had four match points but lost in three sets. In May 2002, she needed another ankle ligament operation, this time on her left ankle. After that, she continued to struggle with injuries and was not able to recapture her best form.  In February 2003, at the age of 22, Hingis announced her retirement from tennis, due to her injuries and being in pain. "I want to play tennis only for fun and concentrate more on horse riding and finish my studies." In several interviews, she has indicated she wishes to return to her home country and coach full-time.  During this segment of her tennis career, Hingis won 40 singles titles and 36 doubles events. She held the World No. 1 singles ranking for a total of 209 weeks (fifth most following Steffi Graf, Martina Navratilova (after whom she was named), Chris Evert, and Serena Williams). In 2005, Tennis magazine put her in 22nd place in its list of 40 Greatest Players of the TENNIS era.

Answer this question "What injuries did she have?" by extracting the answer from the text above.
Hingis underwent surgery on her right ankle.