Battery charger filter circuit
You are getting way ahead of yourself.  Whether you need to monitor line voltage or not, and what filtering you need to apply to that if you do, are design details you are not ready for.

You have to start out with basic specs of what this "battery charger" is supposed to do before you can decide how it's supposed to do it.

Sit down and specify things like what line voltage range it will work with, whether PFC will be necessary, what type and quantity of batteries it will charge, how fast it should charge them, what tradeoffs you might want to make with capacity versus lifetime, etc, etc.