returns { Promise . < void > } export async function ToggleSidebar ( ) { mx . ui . toggleSidebar ( ) ; if ( window && ! ( navigator && navigator . product === "ReactNative" ) ) { document . dispatchEvent ( new CustomEvent ( "toggleSidebar" ) ) ; } return Promise . resolve ( ) ; }