Unfortunate but could have been a lot worse. Like bike knocked over
.
There is a very good chance all you need to do is tighten up the socket head bolt that holds the footrest on from behind it. You will probably find the swinging arm gets in the way so you may need to unbolt or at least slacken off the aluminium carrier that is held to the frame lug with two socket head bolts. Not sure off hand but probably a 6mm allen key needed, maybe same or bigger for the footrest bolt.
There is a flat on the footrest boss that locates with a flat in the aluminium. It is not a right good fit when new so don't worry if that flat is a bit distorted in the aluminium as a result of the bump.
I would do the tightening as soon as possible because if the loose bolt drops out the footrest will also disappear and the gear change or rear brake lever will be left dangling in mid air. Not good.