Csections?

If you are taking pain medication after the surgery are you still able to breastfeed? How does it affect the baby?