Hi Ofer,
To call toggel, get a reference to the dom element your components is on, then call the event that calls your function. In your case it's probably something like:
let ev = new MouseEvent('click',options)
document.querySelector('main-app').dispatchEvent(ev)
To answer your second question, you don't. Making components accessible to the global scope is a terrible idea. (google for 'why is global scope considered bad). There is probably a technical way to do that, but just don't go there.
Regards
Sander