Toggle latching relay with momentary push-button

I have a relay:

HFE10-2 12-HT-L2

Double coils, latching. 12v coil voltage. There are 3 terminals for the coil: 1(-) 5(+) 2(-). If I apply +12 to #5 and ground #1 latch one direction, then ground #2 latch other direction.

Can someone help guide me to a circuit? Using transistor (or something hopefully that I already have) that would flip-flop switch the lead off of my push-button to the correct lead on the relay ?

I am using this for the main-power in relay. I would just like to press a nice button on the case. The button would toggle high-current power through 24v lead battery supply ON. Press the same button to shut it down.

Indeed the relay pin #5 should go to +12V.

The pins 1 & 2 each need driving to ground with a transistor, and each require a free-wheel diode to +12V
(otherwise you'll blow the transistors). The standard relay driving circuit, but duplicated.

To drive the transistor bases you need a bistable circuit to switch between them which triggers on every button
press.

But you also need to debounce the push button, otherwise bounces will put you in a random state. Or put
another way you need a slow speed bistable.

I think you'd find it much easier to use two push buttons, one green one for on, and a big red
emergency stop push button for off. Then only the free-wheel diodes are needed, and its perhaps a
safer set-up.

You can do the bistable and debounce logic circuitry in analog electronics, but it sounds like a job for a ATtiny
or similar running off internal oscillator at low power.

Thanks. It is as complicated as I thought. I will probably reconsider with a more simpler solution.