Where I live, your employer basically has to give you notice (weeks to months, depending where you live). It's common for that notice period to turn into "garden leave" though, i.e. get paid but don't show up.
Mass layoffs, or RIFs, operate under slightly different rules, but I still saw a stark difference between US and EU employees when I went through one at a different corp.
US accounts were deactivated same day. EU employees were given until end of week to look over the proposed terms etc.