Structural basis for SARM1 inhibition and activation under energetic stress