How to temporary disable a submenu?

The player will be able to use the submenu Craft in the Main Menu, but only after certain point in the game.
How do I make the Craft menu to be unavailable, like with grey color and unclickable, and after I get the Alchemy Tool, for instance, the menu is available?

I want to do it with the Journal submenu and Craft submenu...
I'm using Visustella's core engine and Main menu.

Thanks guys!!!
IIRC there's a menu in the Plugin Manager -> Visu_MenuCore where you can control which menu commands are visible or enabled/disabled. When it says you may use JavaScript to enable/disable a menu, you can use this to bind it to a Switch:

Code:
$gameSwitches.value(1)
Replace 1 with your Switch Id.
IIRC there's a menu in the Plugin Manager -> Visu_MenuCore where you can control which menu commands are visible or enabled/disabled. When it says you may use JavaScript to enable/disable a menu, you can use this to bind it to a Switch:

Code:
$gameSwitches.value(1)
Replace 1 with your Switch Id.
I'm sorry, but i'm really a JS dork...
Could you elaborate further?
I messed around the config. here and I really didnt figured it out.
Maybe this helps:

1678467467853.png

Thank you for helping me, but it didn't worked.
I did exactly as you showed and the game crashes with the following error when I try to open the Main menu:

1678468945806.png
Sorry, I did a mistake.

It's
Code:
$gameSwitches.value(1)
and not gameSwitches.value(1)
Sorry, I did a mistake.

It's
Code:
$gameSwitches.value(1)
and not gameSwitches.value(1)
@Aerosys thank you very much, It works!
You're a lifesaver!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-temporary-disable-a-submenu.155677/