Active template synthesis of rotaxanes and molecular shuttles with switchable dynamics by four-component Pd(II)-promoted Michael additions.