/*
* Copyright (c) 2021-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/*** if arkts 1.2 */
import window from '../../@ohos.window';
import { Resource } from '../../global/resource';
import { TextModifier } from '../../arkui/TextModifier';
import { LengthMetrics } from '../../arkui/Graphics';
import { Callback, BlurStyle, CommonMethod, Optional, LayoutSafeAreaType, LayoutSafeAreaEdge, BackgroundEffectOptions, BackgroundBlurStyleOptions, PixelMap, Bindable } from './common'
import { CustomBuilder, PageMapBuilder } from './builder'
import { Length, ResourceStr, ResourceColor, Dimension, VoidCallback } from './units'
import { TitleHeight } from './enums'
import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier'
import { NavDestinationContext, NavDestinationMode } from './navDestination'
/*** endif */
/**
* Import the SystemBarStyle type for Navigation.
*
* @typedef { import('../api/@ohos.window').default.SystemBarStyle } SystemBarStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
declare type SystemBarStyle = import('../api/@ohos.window').default.SystemBarStyle;
/**
* Import the SystemBarStyle type for Navigation.
*
* @typedef { window.SystemBarStyle } SystemBarStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type SystemBarStyle = window.SystemBarStyle;
/**
* Defines the navigation common title.
*
* @interface NavigationCommonTitle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Defines the navigation common title.
*
* @interface NavigationCommonTitle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the navigation common title.
*
* @interface NavigationCommonTitle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface NavigationCommonTitle {
/**
* Sets the main title.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Sets the main title.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Sets the main title.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
/**
* Sets the main title.
*
* @type { string | Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
main: string | Resource;
/**
* Sets the sub title.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Sets the sub title.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Sets the sub title.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
/**
* Sets the sub title.
*
* @type { string | Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
sub: string | Resource;
}
/**
* Defines the navigation custom title.
*
* @interface NavigationCustomTitle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Defines the navigation custom title.
*
* @interface NavigationCustomTitle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the navigation custom title.
*
* @interface NavigationCustomTitle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface NavigationCustomTitle {
/**
* Custom content of the title bar.
*
* @type { CustomBuilder }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Custom content of the title bar.
*
* @type { CustomBuilder }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Custom content of the title bar.
*
* @type { CustomBuilder }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
builder: CustomBuilder;
/**
* Height of the title bar.
*
* @type { TitleHeight | Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Height of the title bar.
*
* @type { TitleHeight | Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Height of the title bar.
*
* @type { TitleHeight | Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
height: TitleHeight | Length;
}
/**
* Navigation mode
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Navigation mode
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Navigation mode
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum NavigationMode {
/**
* The navigation bar and the content area are displayed in stack.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* The navigation bar and the content area are displayed in stack.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The navigation bar and the content area are displayed in stack.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Stack,
/**
* The navigation bar and the content area are displayed side by side.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* The navigation bar and the content area are displayed side by side.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The navigation bar and the content area are displayed side by side.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Split,
/**
* If the window width is greater than 520vp, the navigation component is displayed in split mode.
* Otherwise it's displayed in stack mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* If the window width is greater than the sum of minNavBarWidth and minContentWidth, the navigation component is displayed in split mode.
* Otherwise it's displayed in stack mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* If the window width is greater than the sum of minNavBarWidth and minContentWidth, the navigation component is displayed in split mode.
* Otherwise it's displayed in stack mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Auto,
}
/**
* Navigation bar position
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Navigation bar position
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Navigation bar position
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum NavBarPosition {
/**
* In navigation split mode, the main column is at the start of the main axis.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* In navigation split mode, the main column is at the start of the main axis.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* In navigation split mode, the main column is at the start of the main axis.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Start,
/**
* The navigation bar is on the End of the container
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* The navigation bar is on the End of the container
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The navigation bar is on the End of the container
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
End,
}
/**
* Navigation title mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Navigation title mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Navigation title mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum NavigationTitleMode {
/**
* When the content is more than one screen in a scrollable component, the
* main title shrinks as the content scrolls down (the subtitle fades out
* with its size remaining unchanged) and restores as the content scrolls
* up to the top.
* **NOTE**
* The effect where the main title's size changes in response to content
* scrolling is effective only when **title** is set to **ResourceStr** or
* **NavigationCommonTitle**. If **title** is set to any other value type, the
* main title changes in mere location when pulled down.
* For this effect to work when the content is less than one screen in a
* scrollable component, set the **options** parameter of the scrollable
* component's edgeEffect attribute to **true**. In the non-scrolling state, the
* height of the title bar is the same as in **Full** mode; in the scrolling state,
* the minimum height of the title bar is the same as in **Mini** mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* When the content is more than one screen in a scrollable component, the
* main title shrinks as the content scrolls down (the subtitle fades out
* with its size remaining unchanged) and restores as the content scrolls
* up to the top.
* **NOTE**
* The effect where the main title's size changes in response to content
* scrolling is effective only when **title** is set to **ResourceStr** or
* **NavigationCommonTitle**. If **title** is set to any other value type, the
* main title changes in mere location when pulled down.
* For this effect to work when the content is less than one screen in a
* scrollable component, set the **options** parameter of the scrollable
* component's edgeEffect attribute to **true**. In the non-scrolling state, the
* height of the title bar is the same as in **Full** mode; in the scrolling state,
* the minimum height of the title bar is the same as in **Mini** mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* When the content is more than one screen in a scrollable component, the
* main title shrinks as the content scrolls down (the subtitle fades out
* with its size remaining unchanged) and restores as the content scrolls
* up to the top.
* **NOTE**
* The effect where the main title's size changes in response to content
* scrolling is effective only when **title** is set to **ResourceStr** or
* **NavigationCommonTitle**. If **title** is set to any other value type, the
* main title changes in mere location when pulled down.
* For this effect to work when the content is less than one screen in a
* scrollable component, set the **options** parameter of the scrollable
* component's edgeEffect attribute to **true**. In the non-scrolling state, the
* height of the title bar is the same as in **Full** mode; in the scrolling state,
* the minimum height of the title bar is the same as in **Mini** mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Free = 0,
/**
* The title is fixed at full mode. Default value: If there is only a main
* title, the title bar height is 112 vp; if there is both a main title and a
* subtitle, the title bar height is 138 vp.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* The title is fixed at full mode. Default value: If there is only a main
* title, the title bar height is 112 vp; if there is both a main title and a
* subtitle, the title bar height is 138 vp.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The title is fixed at full mode. Default value: If there is only a main
* title, the title bar height is 112 vp; if there is both a main title and a
* subtitle, the title bar height is 138 vp.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Full,
/**
* The title is fixed at mini mode.
* Default value:if there is only a main title, The title bar height is 56 vp.
* If there are both a main title and a subtitle, the title bar height is 82 vp.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* The title is fixed at mini mode. Default value: In versions earlier than API version 12,
* If there is only a main title, the title bar height is 56 vp; if there are both a main title and a subtitle,
* The title bar height is 82 vp. Since API version 12, the title bar height is 56 vp.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The title is fixed at mini mode. Default value: In versions earlier than API version 12,
* If there is only a main title, the title bar height is 56 vp; if there are both a main title and a subtitle,
* The title bar height is 82 vp. Since API version 12, the title bar height is 56 vp.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Mini,
}
/**
* Navigation menu item, include menu icon and menu info
*
* @interface NavigationMenuItem
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Navigation menu item, include menu icon and menu info
*
* @interface NavigationMenuItem
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Navigation menu item, include menu icon and menu info
*
* @interface NavigationMenuItem
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface NavigationMenuItem {
/**
* The value of navigation menu item.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* The value of navigation menu item.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The value of navigation menu item.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
/**
* The value of navigation menu item.
*
* @type { string | Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
value: string | Resource;
/**
* The icon of navigation menu item.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* The icon of navigation menu item.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The icon of navigation menu item.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
/**
* The icon of navigation menu item.
*
* @type { ?(string | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
icon?: string | Resource;
/**
* The symbol of navigation menu item.
*
* @type { ?SymbolGlyphModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* The symbol of navigation menu item.
*
* @type { ?SymbolGlyphModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.1&1.2
*/
symbolIcon?: SymbolGlyphModifier;
/**
* Whether to enable this menu item.
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
isEnabled?: boolean;
/**
* Trigger by navigation menu item click.
*
* @type { ?(() => void) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Trigger by navigation menu item click.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Trigger by navigation menu item click.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
action?: () => void;
}
/**
* Indicates the information of the popped page.
*
* @interface PopInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Indicates the information of the popped page.
*
* @interface PopInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface PopInfo {
/**
* The info of the popped page.
*
* @type { NavPathInfo }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The info of the popped page.
*
* @type { NavPathInfo }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
info: NavPathInfo;
/**
* The result of the popped page.
*
* @type { Object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The result of the popped page.
*
* @type { Object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
result: Object;
}
/**
* Indicates the information of NavDestination.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Indicates the information of NavDestination.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare class NavPathInfo {
/**
* Creates an instance of NavPathInfo.
*
* @param { string } name - The name of NavDestination.
* @param { unknown } param - The detailed parameter of the NavDestination.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Creates an instance of NavPathInfo.
*
* @param { string } name - The name of NavDestination.
* @param { unknown } param - The detailed parameter of the NavDestination.
* @param { ?import('../api/@ohos.base').Callback } onPop - The callback when next page returns.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
/**
* Creates an instance of NavPathInfo.
*
* @param { string } name - The name of NavDestination.
* @param { unknown } param - The detailed parameter of the NavDestination.
* @param { ?import('../api/@ohos.base').Callback } onPop - The callback when next page returns.
* @param { ?boolean } isEntry - Indicates whether it is an entry destination.
* Default value: **false**.
* **true**: The navigation destination page is the entry page.
* **false**: The navigation destination page is not the entry page.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
constructor(name: string, param: unknown, onPop?: import('../api/@ohos.base').Callback, isEntry?: boolean);
/**
* Creates an instance of NavPathInfo.
*
* @param { string } name - The name of NavDestination.
* @param { Object | null | undefined } param - The detailed parameter of the NavDestination.
* @param { Callback } [onPop] - The callback when next page returns.
* @param { boolean } [isEntry] - Indicates whether it is an entry destination.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
constructor(name: string, param: Object | null | undefined, onPop?: Callback, isEntry?: boolean);
/**
* Name of the navigation destination page.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Name of the navigation destination page.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
name: string;
/**
* Detailed parameters of the navigation destination page.
*
* @type { ?unknown }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Detailed parameters of the navigation destination page.
*
* @type { ?unknown }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
param?: unknown;
/**
* The detailed parameter of the NavDestination.
*
* @type { ?(Object | null | undefined) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
param?: Object | null | undefined;
/**
* Callback returned when pop is called on the navigation destination page.
* It is invoked only after the **result** parameter is set in pop.
*
* @type { ?import('../api/@ohos.base').Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Callback returned when pop is called on the navigation destination page.
* It is invoked only after the **result** parameter is set in pop.
*
* @type { ?import('../api/@ohos.base').Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onPop?: import('../api/@ohos.base').Callback;
/**
* The callback when next page returns.
*
* @type { ?Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
onPop?: Callback;
/**
* Indicates whether it is an entry destination.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
isEntry?: boolean;
/**
* The unique id of NavDestination.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
navDestinationId?: string;
}
/**
* Defines the mode of stack operation.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum LaunchMode {
/**
* Default navigation stack operation mode. In this mode,
* push operations add the specified **NavDestination**page to
* the stack; replace operations replace the current top **NavDestination** page.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
STANDARD = 0,
/**
* When the NavDestination with a specified name exists, it will be moved to top of stack,
* otherwise, the behavior will be consistent with the STANDARD mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
MOVE_TO_TOP_SINGLETON = 1,
/**
* When the NavDestination with a specified name exists, the stack will pop until that NavDestination,
* otherwise, the behavior will be consistent with the STANDARD mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
POP_TO_SINGLETON = 2,
/**
* This mode creates an instance of **NavDestination**. Compared with
* **STANDARD**, this mode does not reuse the instance with the same name in the stack.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
NEW_INSTANCE = 3,
}
/**
* Indicates the options of stack operation.
*
* @interface NavigationOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface NavigationOptions {
/**
* Navigation stack operation mode.
* Default value: **LaunchMode.STANDARD**.
*
* @type { ?LaunchMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
launchMode?: LaunchMode;
/**
* Whether to support transition animation.
* Default value: **true**.
* **true**: The transition animation is supported.
* **false**: The transition animation is not supported.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
animated?: boolean;
}
/**
* Indicates the information of NavDestinations. Providers methods for controlling destination page in the stack
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Indicates the information of NavDestinations. Providers methods for controlling destination page in the stack
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare class NavPathStack {
/**
* Creates an instance of NavPathStack.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Creates an instance of NavPathStack.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
constructor();
/**
* Pushes the navigation destination page specified by **info** onto the navigation stack.
*
* @param { NavPathInfo } info - Indicates the NavDestination to be pushed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Pushes the navigation destination page specified by **info** onto the navigation stack.
*
* @param { NavPathInfo } info - Indicates the NavDestination to be pushed.
* @param { boolean } [animated] - Whether to support the transition animation.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
pushPath(info: NavPathInfo, animated?: boolean): void;
/**
* Pushes the navigation destination page specified by **info** onto the navigation stack.
* Depending on the launchMode specified in the **options** parameter, different behaviors will be triggered.
*
* @param { NavPathInfo } info - Indicates the NavDestination to be pushed.
* @param { NavigationOptions } [options] - Indicates options of stack operation.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
pushPath(info: NavPathInfo, options?: NavigationOptions): void;
/**
* Pushes the navigation destination page specified by **info** onto
* the navigation stack. This API uses a promise to return the result.
*
* @param { NavPathInfo } info - Information about the navigation destination page.
* @param { boolean } [animated] - Whether to support the transition animation.
* Default value: **true**.
* **true**: The transition animation is supported.
* **false**: The transition animation is not supported.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameters types.
* 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100005 - Builder function not registered.
* @throws { BusinessError } 100006 - NavDestination not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Pushes the navigation destination page specified by **info** onto
* the navigation stack. This API uses a promise to return the result.
*
* @param { NavPathInfo } info - Information about the navigation destination page.
* @param { boolean } [animated] - Whether to support the transition animation.
* Default value: **true**.
* **true**: The transition animation is supported.
* **false**: The transition animation is not supported.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameters types.
* 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100005 - Builder function not registered.
* @throws { BusinessError } 100006 - NavDestination not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
pushDestination(info: NavPathInfo, animated?: boolean): Promise;
/**
* Pushes the navigation destination page specified by **info** onto the navigation stack.
* This API uses a promise to return the result. Depending on the LaunchMode
* specified in the **options** parameter, different behaviors will be triggered.
*
* @param { NavPathInfo } info - Information about the navigation destination page.
* @param { NavigationOptions } [options] - Navigation options.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameters types.
* 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100005 - Builder function not registered.
* @throws { BusinessError } 100006 - NavDestination not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
pushDestination(info: NavPathInfo, options?: NavigationOptions): Promise;
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { unknown } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { unknown } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
pushPathByName(name: string, param: unknown, animated?: boolean): void;
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { Object | null | undefined } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
pushPathByName(name: string, param: Object | null | undefined, animated?: boolean): void;
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @param { import('../api/@ohos.base').Callback } onPop - The callback when next page returns.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @param { import('../api/@ohos.base').Callback } onPop - The callback when next page returns.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
pushPathByName(name: string, param: Object, onPop: import('../api/@ohos.base').Callback, animated?: boolean): void;
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @param { Callback } onPop - The callback when next page returns.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
pushPathByName(name: string, param: Object, onPop: Callback, animated?: boolean): void;
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameters types.
* 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100005 - Builder function not registered.
* @throws { BusinessError } 100006 - NavDestination not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameters types.
* 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100005 - Builder function not registered.
* @throws { BusinessError } 100006 - NavDestination not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
pushDestinationByName(name: string, param: Object, animated?: boolean): Promise;
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @param { import('../api/@ohos.base').Callback } onPop - The callback when next page returns.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameters types.
* 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100005 - Builder function not registered.
* @throws { BusinessError } 100006 - NavDestination not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @param { import('../api/@ohos.base').Callback } onPop - The callback when next page returns.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameters types.
* 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100005 - Builder function not registered.
* @throws { BusinessError } 100006 - NavDestination not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
pushDestinationByName(name: string, param: Object, onPop: import('../api/@ohos.base').Callback, animated?: boolean): Promise;
/**
* Pushes the specified NavDestination into the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be pushed.
* @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed.
* @param { Callback } onPop - The callback when next page returns.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameters types.
* 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100005 - Builder function not registered.
* @throws { BusinessError } 100006 - NavDestination not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
pushDestinationByName(name: string, param: Object, onPop: Callback, animated?: boolean): Promise;
/**
* Replace the current NavDestination with the specific one.The current NavDestination will be destroyed.
*
* @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Replace the current NavDestination with the specific one.The current NavDestination will be destroyed.
*
* @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported.
* **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
replacePath(info: NavPathInfo, animated?: boolean): void;
/**
* Replace the current NavDestination with the specific one.The current NavDestination will be destroyed.
*
* @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack.
* @param { NavigationOptions } [options] - Indicates options of stack operation.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
replacePath(info: NavPathInfo, options?: NavigationOptions): void;
/**
* Replace the NavDestination into the stack.
*
* @param { NavPathInfo } info - Indicates the NavDestination to replace in stack.
* @param { NavigationOptions } [options] - Indicates options of stack operation.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameters types.
* 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100005 - Builder function not registered.
* @throws { BusinessError } 100006 - NavDestination not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
replaceDestination(info: NavPathInfo, options?: NavigationOptions): Promise;
/**
* Replace the current NavDestination with the specific one.The current NavDestination will be destroyed.
*
* @param { string } name - Indicates name of the new NavDestination in top of stack.
* @param { Object } param - Indicates the detailed parameter of the new NavDestination in top of the stack.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Replace the current NavDestination with the specific one.The current NavDestination will be destroyed.
*
* @param { string } name - Indicates name of the new NavDestination in top of stack.
* @param { Object } param - Indicates the detailed parameter of the new NavDestination in top of the stack.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
replacePathByName(name: string, param: Object, animated?: boolean): void;
/**
* Remove the specified NavDestinations by indexes.
*
* @param { Array } indexes - Indicates the indexes of the NavDestinations to be removed.
* @returns { number } Returns the number of removed pages. Invalid indexes will be ignored.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Remove the specified NavDestinations by indexes.
*
* @param { Array } indexes - Indicates the indexes of the NavDestinations to be removed.
* @returns { number } Returns the number of removed pages. Invalid indexes will be ignored.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
removeByIndexes(indexes: Array): number;
/**
* Removes the navigation destination page specified by **name** from the navigation stack.
*
* @param { string } name - Indicates the name of the NavDestination to be removed.
* @returns { number } Returns the number of removed NavDestinations.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Removes the navigation destination page specified by **name** from the navigation stack.
*
* @param { string } name - Indicates the name of the NavDestination to be removed.
* @returns { number } Returns the number of removed NavDestinations.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
removeByName(name: string): number;
/**
* Removes the navigation destination page specified by **navDestinationId** from
* the navigation stack. **navDestinationId** can be obtained from the onReady callback
* of **NavDestination** or from NavDestinationInfo.
*
* @param { string } navDestinationId - Unique ID of the navigation destination page to remove.
* @returns { boolean } Returns true if remove successfully, otherwise returns false.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
removeByNavDestinationId(navDestinationId: string): boolean;
/**
* Pops the top NavDestination out of the stack.
*
* @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Pops the top NavDestination out of the stack.
*
* @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**.
* @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
pop(animated?: boolean): NavPathInfo | undefined;
/**
* Pops the top NavDestination out of the stack. Invokes the **onPop** callback to pass the page processing result.
*
* @param { Object } result - The result of the NavDestination.
* @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**.
* @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Pops the top NavDestination out of the stack. Invokes the **onPop** callback to pass the page processing result.
*
* @param { Object } result - The result of the NavDestination.
* @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**.
* @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
pop(result: Object, animated?: boolean): NavPathInfo | undefined;
/**
* Pops the specified NavDestination out of the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be popped.
* @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Pops the specified NavDestination out of the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be popped.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
popToName(name: string, animated?: boolean): number;
/**
* Pops pages until the first navigation destination page.
* That matches **name** from the bottom of the navigation stack is at the top of the stack.
* This API uses the **onPop** callback to pass in the page processing result.
*
* @param { string } name - Indicates the name of the NavDestination to be popped.
* @param { Object } result - The result of the NavDestination.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Pops pages until the first navigation destination page.
* That matches **name** from the bottom of the navigation stack is at the top of the stack.
* This API uses the **onPop** callback to pass in the page processing result.
*
* @param { string } name - Indicates the name of the NavDestination to be popped.
* @param { Object } result - The result of the NavDestination.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
popToName(name: string, result: Object, animated?: boolean): number;
/**
* Pops the specified NavDestination out of the stack.
*
* @param { number } index - Indicates the index of the NavDestination to be popped.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Pops the specified NavDestination out of the stack.
*
* @param { number } index - Indicates the index of the NavDestination to be popped.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
popToIndex(index: number, animated?: boolean): void;
/**
* Pops the specified NavDestination out of the stack.
*
* @param { number } index - Indicates the index of the NavDestination to be popped.
* @param { Object } result - The result of the NavDestination.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* Default value: **true**.
* **true**: The transition animation is supported. **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
popToIndex(index: number, result: Object, animated?: boolean): void;
/**
* Moves the first navigation destination page of this name to the top of stack.
* That matches **name** from the bottom of the navigation stack to the top of the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be moved to the top.
* @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Moves the first navigation destination page of this name to the top of stack.
* That matches **name** from the bottom of the navigation stack to the top of the stack.
*
* @param { string } name - Indicates the name of the NavDestination to be moved to the top.
* @param { boolean } [animated] - Indicates whether the transition is animated.
* @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
moveToTop(name: string, animated?: boolean): number;
/**
* Moves to the top of the navigation stack the navigation destination page specified by **index**.
*
* @param { number } index - Index of the navigation destination page. The index is zero-based.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Moves to the top of the navigation stack the navigation destination page specified by **index**.
*
* @param { number } index - Index of the navigation destination page. The index is zero-based.
* @param { boolean } [animated] - Whether to support the transition animation.
* Default value: **true**.
* **true**: The transition animation is supported.
* **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
moveIndexToTop(index: number, animated?: boolean): void;
/**
* Clears the navigation stack.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Clears the navigation stack.
*
* @param { boolean } [animated] - Whether to support the transition animation.
* Default value: **true**.
* **true**: The transition animation is supported.
* **false**: The transition animation is not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
clear(animated?: boolean): void;
/**
* Obtains the names of all navigation destination pages in the navigation stack.
*
* @returns { Array } Returns all the NavDestination name in the stack;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Obtains the names of all navigation destination pages in the navigation stack.
*
* @returns { Array } Returns all the NavDestination name in the stack;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
getAllPathName(): Array;
/**
* Obtains the parameter information of the navigation destination page specified by **index**.
*
* @param { number } index - Index of the navigation destination page. The index is zero-based.
* @returns { unknown | undefined } Returns the detailed parameter of the NavDestination.
* If it exists in the stack, otherwise returns undefined;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Obtains the parameter information of the navigation destination page specified by **index**.
*
* @param { number } index - Index of the navigation destination page. The index is zero-based.
* @returns { unknown | undefined } Returns the detailed parameter of the NavDestination.
* If it exists in the stack, otherwise returns undefined;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
getParamByIndex(index: number): unknown | undefined;
/**
* Obtains the param of the specified NavDestination.
*
* @param { number } index - Indicates the index of the NavDestination.
* @returns { Object | null | undefined } Returns the detailed parameter of the NavDestination if it exists in the stack, otherwise returns undefined;
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
getParamByIndex(index: number): Object | null | undefined;
/**
* Obtains the param of the specified NavDestination.
*
* @param { string } name - Indicates the name of the NavDestination.
* @returns { Array } Returns the detailed parameter of all the NavDestinations.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Obtains the param of the specified NavDestination.
*
* @param { string } name - Indicates the name of the NavDestination.
* @returns { Array } Returns the detailed parameter of all the NavDestinations.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
getParamByName(name: string): Array;
/**
* Obtains the param of the specified NavDestination.
*
* @param { string } name - Indicates the name of the NavDestination.
* @returns { Array