I have a Calcite panel that could be opened from action bar (or closed if the action bar button is pressed again), could be closed using the X on the panel itself, or could be closed programmatically when another panel is opened. Rather than wiring up what happens when the button is pressed on the action bar, or when the X is pressed on the panel, etc., can't I just use the following code in my setup to watch the panel closed property (it doesn't seem to work)? This seems a lot cleaner than setting up some sort of helper function that gets called from various places.
let myPanel = document.getElementById('my-panel') as HTMLCalcitePanelElement
reactiveUtils.watch(
() => myPanel.closed,
(panelClosedStatus) => {
console.log('my panel closed status just changed')
}
)