Firing someone during their parental leave is a special kind of messed up. The fact that it's not completely illegal in any reasonable country is horrifying.
It's illegal in my state in the US. Also if you do FMLA in the US it would be illegal if you're the parent who gave birth. Outside of a few states here in the US you're basically expected back at work as soon as you get out of the hospital unless you have a doctor's note.