Pipewire automatic device switching

How would I configure pipewire such that when I plug a headset into the audio jack it automatically switches the default audio input to the microphone? It already automatically switches the output to the headset, so this should be possible.