I have some questions about how to power a project through main if available, and rechargeable batteries when disconnected from the main. In a nutshell, lets say I want to power some ws2812B RGB Leds (24 LED Ring) for about an 1-2+hours using NIMH batteries, and otherwise use a 5V 3A (or 12V 3A adapter with step-down buck converter to get 5V since I have many) adapter when the batteries run out or are not needed.
I attached an image with 2 possible solutions, but not sure they would work.
Solution A would have the 5V adapter simultaneously power a battery charger, the nano, and RGB leds. If the main was disconnected the batteries would power the 5V pin on the nano and leds.
Solution B would have the 5V adapter power the battery charger only if needed, otherwise the batteries would power everything else. (Probably not a good solution using batteries as they're charging)
Any advice on either of these methods or a better solution to do this? The plan is to use a pro micro later that controls the RGB leds and does other things like goes into sleep mode after a certain amount of time and other things. The battery charger module would be something like this: https://www.aliexpress.com/i/4000557338699.html