# Released under the MIT License. See LICENSE for details.#"""Contains AppModeSelector base class."""from__future__importannotationsfromtypingimportTYPE_CHECKINGifTYPE_CHECKING:frombabase._appintentimportAppIntentfrombabase._appmodeimportAppModeclassAppModeSelector:"""Defines which AppModes are available or used to handle given AppIntents. Category: **App Classes** The app calls an instance of this class when passed an AppIntent to determine which AppMode to use to handle the intent. Plugins or spinoff projects can modify high level app behavior by replacing or modifying the app's mode-selector. """
[docs]defapp_mode_for_intent(self,intent:AppIntent)->type[AppMode]|None:"""Given an AppIntent, return the AppMode that should handle it. If None is returned, the AppIntent will be ignored. This may be called in a background thread, so avoid any calls limited to logic thread use/etc. """raiseNotImplementedError()