Will I be able to hike/run again post surgery?

Hi! I'm pretty sure I'll end up with surgery on my feet at some point, but I've been very reluctant to get it done, as I'm nervous about the state of my feet afterwards. I'm worried how surgery might affect my ability to work out/run/hike, as I (used to) enjoy hiking and running a lot. Has anybody successfully managed running/hiking post surgery? I'm thinking long term - I'm aware that there'll be a certain downtime for recovery. I also do rock climbing and fear that my feet won't be able to bend in all those weird positions post surgery. Any experience is much appreciated! Thanks.