Pervez Khattak agrees conditionally to leave PTI post