I am creating plugin menu items like:

push @menu, {
text => $client->string('PLUGIN_DENONAVPCONTROL_AUDIO4'),
id => 'nightmode',
"icon" => $dynamicVolIcon,
actions => {
go => {
player => 0,
cmd => [ 'avpNM' ],
params => {
menu => 'avpNM',
},
},
},
};

I would like to know how I can toggle the state of the menu item between disabled and normal.