Well because of these reasons - particularly the death of several leaders - I do think Hezbollah has been severely damaged. But Hamas have never worried about deaths on their "side", as long as they can provoke Israel into provoking a new generation of recruits. Add in damaging Israel's international relations (eg the Irish embassy thing), and I think a lot of their leaders will be pretty satisfied with the trade.
ย
Hamas aren't benevolent defenders of the people of Gaza - they're a terrorist group whose stated aim is the destruction of Israel. Given decreased sympathy for Israel internationally and another generation of recruits directly, I think they've gained a lot of what they wanted to.