Design of polymer-based antimicrobial hydrogels through physico-chemical transition