The TP-82 design, while technically a pistol, has a double-barrel shotgun mounted on top of another barrel that fires 5.45x39 rounds (same as an AK-47). A lot more punch than your typical pistol. I wouldn't want to be a bear looking down the wrong end of one.
A pistol is better than a sharp stick. There was a Grizzly killed in Montana a few years ago with a 9mm, the bear was spooked and attacked, iirc the gun was a sub-compact, so figure no more than 12 rounds if he shot and landed all of them.