Switching Battery to another Battery

Hi good day everyone I was just wondering if is it possible if I have a two batteries then when the arduino detect that the 1st battery that it is already fully charged it will switch to the other battery, or is their a circuit that will do that like multiplexing or simply making use of relays. thank you