Is there a way to check if XD is in prototype mode?

Is there an API to check if XD is in prototype mode?

We don’t currently have an API that tell you which workspace XD is currently in, Design, Prototype, or Share. What is your use cases?

At least when you’re in Share, panels plugins aren’t even in the picture.

My plugin uses Prototype interaction information.

So I need them to be in Prototype mode to add interactions. If they are in Prototype mode I can show different options to the user and instruct them to switch into it if they are not in it or switch out of it if the interaction is complete.