peace deal basically legitimised them in the eyes of the entire world and made the world feel comfortable in supporting them. In reality that action is an act of treason or immense stupidity.
Yes we had major problems with Syria supporting terrorists. But before the civil war erdogan and assad were having holidays together.
When the civil war started we were actually doing the right thing, communicating with assad and trying to get him to hold elections. During this period the international media was doing its thing and demonising us for it claiming we had "turned east" getting close to nations like syria, iran and russia. Then about 6 months maybe a year into it AK party made the biggest mistake of the republics history, they joined the american/isreali war in such a way where Turkey was trapped and could be manipulated. 10 years in and they still messing us around.
It should have been played in a similar way to how Ukraine is played, doesnt matter which it goes Turkey is hedged.
As it stands now AK party created a situation where we get to feed 10 million syrian refugees while everyone else is united against us in syria. Insane fail and the constant barking we can come suddenly one night tarnishes our repetition and harms any threat we may have to stop others doing evil towards us.
like i said AK party is basically a collection of populist politicians, they are not statesman.