I want to be able to change the style of a custom widget that clears all selected features in the map based on whether or not there is a selection similar to how ArcGIS Pro works. If there is no selection, I want it to be grayed out. If there is a selection, I want it to look normal.
What are the options available to do that?