How to make a choice between layers?

How would I make it so you have 2 choices for the next layer, and when you buy an upgrade for one, the other dissapears?

update, ive figured out slightly how to do it, using the following lines of code:
first layer (B):

layerShown(){return (hasUpgrade (“jj”,22)) || player.b.unlocked |! player.h.unlocked},

second layer (H):

layerShown(){return (hasUpgrade (“jj”,22)) || player.h.unlocked |! player.b.unlocked},

Unfortunately, it also makes it so the layers are immediately visible from booting up a new save, and I don’t want that. How would I fix this?

im slightly confused here, what does upgrade jj 22 do here? does it choose between layers b and h? if so, how do you use two states for the upgrade (purchased, not purchased) to express three states of player decision (selected layer b, selected layer h, not selected)?

one solution (albeit non-optimal) is to use two upgrades, one for each layer and disappear the other upgrade whenever one is purchased.
in which, layer b unlock condition becomes hasUpgrade(‘jj’, 21), the unlock condition for upgrade jj 21 becomes (whattever it was before)&&(!hasUpgrade(‘jj’, 22)), and vice versa for layer h and upgrade jj 22