Hello, Sukev. You did not say where you are located or show pics but here are just a few comments/guesses.
Potted plants normally require more frequent waterings and hydrangeas are always at the very top of the watering queue. Wilting happens when the hydrangea plant’s leaves loose moisture faster than they can absorb more water through the roots so... try to maintain the potting soil as evenly moist as you can. It is very common for hydrangea leaves to wilt in the summer or in windy days but, they recover on their own quickly if the potting soil is moist.
I have a potted Pistachio Hydrangea that I have been experimenting with (trying to see how long I can keep the blooms alive). The blooms here turn brown early due to heat, etc so I have been watering about 1/2 to 1 gallon if it has not rained more than 1". So far, the blooms turned from the regular Pistachio mix of pink with green to almost all green. One effect of all this watering has been that the leaves have not wilted except on days when I did not water (but they fixed themselves on their own because the soil was still moist enough).
If your soil is not kept evenly moist and gets dry, the plant will first abort any unopened flower buds; then it will abort opened blooms and then the leaves will start to brown out from the edges inwards. So take precautions to keep the soil moist.
Your blooms should normally go through a color progression from white to white with green/pink spots/tones and then on to brown. If the blooms went directly from white to brown, the plant prematurely aborted the blooms due to lack of water. If the blooms went from white to white to green/pink to brown instead then you just have blooms that are spent/old. At this point, you can either deadhead the spent blooms or keep them for winter interest. If you have a new plant, it may help to provide some extra shade during its first summer with lawn chairs, umbrellas or what have you; or move the pot so it only gets morning sun: the things will help the blooms not dry out quickly.
About the browned out leaves… That could be caused by lack of water as I said earlier. I am not sure where you are but, leaves will also brown out in the Fall when the plant goes dormant. In the northeast, this process starts soon -in the Fall- and down here it occurs in late Fall or early winter. I doubt your plant may be starting to shut down now but, I am not sure where are you so I guess it may be possible your plant might be shutting down if you live in some locales like Alaska, Canada, etc.