interface CloseScreenResult { /** * Error message. * @requiredField error */ error: string; /** * Data sent when a screen closes to the screen beneath it in the stack. Learn more about [stack navigation](https://dev.wix.com/docs/velo/apis/wix-navigate-mobile/introduction#apis_wix-navigate-mobile_stack-navigation). * @requiredField data */ data: object; } interface ClosedScreenData { /** * Error message. * @requiredField error */ error: string; /** * Data sent when a screen closes to the screen beneath it in the stack. Learn more about [stack navigation](https://dev.wix.com/docs/velo/apis/wix-navigate-mobile/introduction#apis_wix-navigate-mobile_stack-navigation). * @requiredField data */ data: object; } interface ScreenContext { /** * The screen's data, defined when the screen is opened by `toScreen()`. */ data?: object; } /** * Closes the current screen. * * ![developer preview tag](https://user-images.githubusercontent.com/89579857/213133550-2b4fa3e8-e8fc-4513-a733-00abcc70925c.png) * * `closeScreen()` returns a promise that resolves when the screen closes. * @param ClosedScreenData - Data to send to the screen beneath this one in the stack. Learn more about [stack navigation](https://dev.wix.com/docs/velo/apis/wix-navigate-mobile/introduction#apis_wix-navigate-mobile_stack-navigation). * @requiredField ClosedScreenData * @servicePath wix-navigate-mobile.ClosedScreenData */ declare function closeScreen(ClosedScreenData: ClosedScreenData): Promise; /** * Get's the screen's data. * * ![developer preview tag](https://user-images.githubusercontent.com/89579857/213133550-2b4fa3e8-e8fc-4513-a733-00abcc70925c.png) * * `getScreenContext()` returns the screen's data. This includes any data context passed into the screen on which the widget is placed, such as data defined when the screen is opened using `toScreen()`. * * @servicePath wix-navigate-mobile.ScreenContext */ declare function getScreenContext(): Promise; /** * Directs the mobile app to open the specified URL in the device's browser. * * ![developer preview tag](https://user-images.githubusercontent.com/89579857/213133550-2b4fa3e8-e8fc-4513-a733-00abcc70925c.png) * * Supported URL formats: * + An external web address. For example, `"http(s)://"`. * + A URI such as a phone number, geographic coordinates, social media link, or email. For example, `"mailto:@?subject="`. * @param url - The URL to open. * @requiredField url * @returns Fulfilled - When the navigation is successful. */ declare function openURL(url: string): Promise; /** * Opens the specified screen. * * ![developer preview tag](https://user-images.githubusercontent.com/89579857/213133550-2b4fa3e8-e8fc-4513-a733-00abcc70925c.png) * * `toScreen()` returns a promise that resolves when the opened screen closes. Learn more about [stack navigation](https://dev.wix.com/docs/velo/apis/wix-navigate-mobile/introduction#apis_wix-navigate-mobile_stack-navigation). * @param screenId - Name of the screen to open, as defined in the app editor. Learn more about [managing your app's screens](https://support.wix.com/en/article/wix-mobile-apps-managing-your-apps-screens). * @requiredField screenId * @param data - Data to send to the target screen. * @returns Fulfilled - When the target screen closes. * @servicePath wix-navigate-mobile.CloseScreenResult */ declare function toScreen(screenId: string, data?: object): Promise; declare const navigateMobileSdkModuleContext_closeScreen: typeof closeScreen; declare const navigateMobileSdkModuleContext_getScreenContext: typeof getScreenContext; declare const navigateMobileSdkModuleContext_openURL: typeof openURL; declare const navigateMobileSdkModuleContext_toScreen: typeof toScreen; declare namespace navigateMobileSdkModuleContext { export { navigateMobileSdkModuleContext_closeScreen as closeScreen, navigateMobileSdkModuleContext_getScreenContext as getScreenContext, navigateMobileSdkModuleContext_openURL as openURL, navigateMobileSdkModuleContext_toScreen as toScreen }; } type Methods = { [P in keyof T as T[P] extends Function ? P : never]: T[P]; }; declare const navigateMobileContext: Methods; export { navigateMobileContext as navigateMobile };