Hello.
This is an unfortunate incident. However, even if you had a reason to defend yourself, terminating you for that incident would not be against the law, regardless of who was right in that altrecation.
On a more personal note, if something like that ever happens in the future, consider other ways of defending yourself, such as leaving the counter, calling security or manager. Hitting a customer or any other person back instead of the above options will hardly ever serve you well at work.
Thanks,
Arkady Itkin