Determines the visibility of a payload based on specified conditions.
Param: isVisible
A function that takes a payload as a parameter and returns a boolean value or a Promise that resolves
to a boolean value indicating visibility.
Returns
If the isVisible function returns a boolean value, this function will return the evaluated value. If the isVisible function returns a Promise
, this function will return a Promise that resolves to a boolean value.
Represents a menu option.