If One Specific Tag is Selected, Deselect Another Specific Tag

In code, how can I go about doing:
If “Articles” is selected, deselect “Videos” and vice versa. This really has me stumped.

These share a dataset of “ContentCollectionDataset”

$w.onReady(() => {
let selectedValue = '';
$w('#selecttionTags').onChange(({target}) => {
    const values = target.value;
    const numOfValues = values.length;
    if(!numOfValues ){
        selectedValue = '';
    } else {
 selectedValue = values.find(e => e !== selectedValue);
    target.value = [selectedValue];
        }
    })
})