How do I change the idle animation for an SWEP

I’m working on an M1 Garand SWEP, but I need to make it change to the idle_empty animation once the clip is empty. Any ideas?