Molecular design of photoswitchable surfaces with controllable wettability