In the sentence
友人に彼女ができると辛い
I'm a bit unclear as to what と辛い is actually supposed to mean (or even if it's supposed to separately be と and 辛い).
As far as my understanding goes:
彼女ができる means something like "become (someone's) girlfriend"
辛い in this context, I think, means "painful"/"bitter"
So perhaps "(someone) was hurt by becoming girlfriend to friend" (in other words, they broke up?) What's the use of と辛い here?