The battery needs a direct current to charge. The switched mode power supply (SMPS) can be used to convert the AC supply to the DC supply. The input voltage from AC mains is directly rectified in SMPS.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.