My two cents:
Thieves in Spain are usually not violent. They will (as in this case) try to steal whatever they can by cheating or distracting you in some way. If you see them stealing, they will go away and will try to steal someone else.
However, if you hit him, he will either run or defend himself by whatever means available (possibly with white arms, very unprobably with fire arms). It is a risk as you see. What will you win by hitting him?
More specificly: According to spanish law self defense is based not on reasonable force, but on "equal force" if you want. I mean that if someone hits you or try to steal your bag violently hitting him would be considered self defense, but attacking him with a knife or shooting him with a pistol would not.
In a similar behaviour, our police agents may only use their fire arms if they are shooted or his or someone else life is in true danger. It is not acceptable to shoot a criminal unless he is shooting someone else or menacing someone's life.
But be careful, as martial arts are considered a grade in self defense, almost as if you were attaking someone with a knife. If you hit someone who doesn't know martial arts it would not be consider self defense.
Of course, you may conceal your martial arts knowledge
, and in the worst case (unless you kill your foe or do him serious injuries), if the judge doesn't consider it self defense, you will just have to pay some hundreds euros.
Any way, noone will drop a tear if you give a lesson to a thief
If you yell out people may even help (specially being a woman).
Fernando