Well I think Amir is a good talent but not the second coming of Wasim as some portray him to be. I also don't subscribe to theory that he would have been the number one bowler today if he wouldn't have been banned. So far he hasn't shown anything that he is a bigger talent than someone like Starc or Boult (will probably never be close to the former in ODIs) but even if he's at their level, he's still miles better than what we've got included Wahab 'bang it short' Riaz, so his ability is not an issue. He already looks a better bowler than any of our current pacers.
As far as losing Hafeez is concerned, he has been a comprehensive player in the last 5 years but he's nearly 35 now and doesn't bowl anymore. He has been brilliant as Test opener this year but he is not consistent enough in ODIs and T20s.
Azhar on the other hand is our second/third best Test batsman and is on course to playing 100 Tests for Pakistan. So if it is between Hafeez and Amir, I can sacrifice Hafeez for someone who can lead our bowling attack for 10 years, but not Azhar.