Plan to restore Pakistan- Reclaiming the founding moment

What was Prophet's solution for this issue? Did he present any at all or left it for the future genrations to decide for themselves?
And since in sharia, the center point is the book of Allah, what does Quran say about this issue of choosing a leader? Any verse, any examples?