As a private citizen with a license to carry, I am under far less of an obligation than an off-duty LEO. I could, legally, sit by and watch as an armed robber summarily executed store employees and customers and only intervene when it appeared that my life was close to being directly threatened. As for any moral obligation, that's between me, the Almighty, and the guy in the mirror.
Realistically, robbers rob stores because they want the money. Taking money that doesn't belong to you is one thing. Executing innocents is something else altogether. There is a clear disparity under the law in terms of sentencing, most of the time. There are lots more robberies than there are murders.
If it's just a robbery, and it looks like it's going to remain just a robbery, I'm going to be a good witness watching from behind cover or concealment. If they start frisking customers, lining people up along the wall or ground, or any other behavior indicative of a plan to kill people or eliminate witnesses, then I'm not going to remain just a witness.
As for what I would do, well, that's going to depend. There are 1,001 possible variables, and even if one accounted for every such variable here, one would probably discover another 1,001 other variables. Some things that might alter my behavior would be questions like am I alone or is the wife with me, are the kids with me, are the kids and the wife with me, is it the kids only, is it just one of the kids.
What I can and cannot do is dictated by who I need to protect. I want to protect every innocent in harms way, but first and foremost there are innocents I need to protect.
Wet your britches, stamp your feet, or flame away if you must, but if given the choice between saving one of my kids and saving the cashier, my kid is going home alive with me and I'll mourn the death of the cashier. Things aren't always that clear cut. It's not Howie Mandel showing and asking, Deal or No Deal? The cashier or your kid?
Some have said no verbal challenges, never this, always that, etc.
I tend to believe that one should always remember to never use the words always or never. You might have to shoot an armed robber in the back to save an innocent. You might decide to yell a verbal challenge to the second armed robber who's reaching for a handgun in his waistband as he drops the loot he was carrying.