Being laid off when on maternity leave

I was notified that my position has been eliminated today when I am on my maternity leave. (Company: Applied Materials)

Before I was laid off, my manager kept saying that when I returned from leave, they would give me more projects and that they expect me to contribute a lot to the team next year.

I was diagnosed having preeclampsia around 35 weeks and doctor asked me to rest at home to protect the baby and myself…

So I have been out for couple weeks already and I was notified that I will be laid off after my leave ends…

I am wondering what i should do next?

It’s a huge and sudden change for me and my family.

I remember my manager said my position has been eliminated.

I will have choice to either try to find a job internally or just receive my severance package after my leave ends.

I am not sure if I will have my parental leave for my baby at this point… sigh

I worked at semiconductor equipment company.

I am in California San Jose Area