If they had invited me, I wouldn’t have gone to bed.(type 2)
The conditional
Reformulation using “if” : They didn’t invite me, that’s why I went to bed.