What caused my grinder to quit working?

I have the Ridgid 7-in twist handle corded grinder. I used it one time no problem the second time I used it I ran it for a couple minutes set it down to move something picked it back up pulled the trigger and it it made a popping sound was like a flash right at the trigger and from there it stopped working, I know after taking it apart that I need to do some rewiring but do I need to replace the trigger switch and what caused it to do that? It was brand new, it was only the second time I've used it!

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0