Baghdadi is gone, And Taliban's have no affiliation with ISIS. By the looks of it Taliban's will eventually take over. There wont be any democracy, Taliban's wants sharia system and US agreed to it in peace talks among other things.
Al qaeda is exterminated by US and NATO in Afghanistan, ISIS is hunted by Taliban's and Pakistan. After US & NATO withdraw hopefully things start to normalize.
Few years back China made a deal with Kabul government for a copper mine & a separate deal was made with the Taliban, which was facilitated by unknown power, but the deal didn't materialize due to Kabul government not wanting Taliban's to get share of the pie. When the western supported government is gone China will be back, There were planes to connect Afghanistan to Pakistani motorway network And taliban did welcome foreign investment.
Taliban's have an office in Qatar and their delegation visited Pakistan, Russia, Iran, Malaysia the rest i don't remember, Seems like the mentioned countries are comfortable with Taliban in Afghan Government.