Your listener id (must be unique)
Your listener function
// log a message in the console when the side panel is closed or opened
JMap.Application.Event.UI.on.sidePanelVisibilityChanged(
"custom-side-panel-visibility-changed",
params => console.log(`New panel visibility: ${params.isVisible}"`)
)
JMap.Application.Event.UI.on.sidePanelVisibilityChanged
This event is triggered when the side panel is closed or opened.