161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file Defines provides a push method for the target page in the routing table.
1861847f8eSopenharmony_ci * @kit ArkUI
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ci/**
2261847f8eSopenharmony_ci * provides a push method for the target page in the routing table.
2361847f8eSopenharmony_ci *
2461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
2561847f8eSopenharmony_ci * @atomicservice
2661847f8eSopenharmony_ci * @since 12
2761847f8eSopenharmony_ci */
2861847f8eSopenharmony_ciexport declare class NavPushPathHelper {
2961847f8eSopenharmony_ci  /**
3061847f8eSopenharmony_ci   * The constructor used to create a NavPushPathHelper object.
3161847f8eSopenharmony_ci   *
3261847f8eSopenharmony_ci   * @param { NavPathStack } navPathStack - The stack of the route table.
3361847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
3461847f8eSopenharmony_ci   * @atomicservice
3561847f8eSopenharmony_ci   * @since 12
3661847f8eSopenharmony_ci   */
3761847f8eSopenharmony_ci  constructor(navPathStack: NavPathStack);
3861847f8eSopenharmony_ci
3961847f8eSopenharmony_ci  /**
4061847f8eSopenharmony_ci   * Pushes the route page into the stack.
4161847f8eSopenharmony_ci   *
4261847f8eSopenharmony_ci   * @param { string } moduleName - Module name
4361847f8eSopenharmony_ci   * @param { NavPathInfo } info - Indicates the route page to be pushed.
4461847f8eSopenharmony_ci   * @param { boolean } [animated] - Indicates whether the transition is animated.
4561847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
4661847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
4761847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
4861847f8eSopenharmony_ci   * @atomicservice
4961847f8eSopenharmony_ci   * @since 12
5061847f8eSopenharmony_ci   */
5161847f8eSopenharmony_ci  pushPath(moduleName: string, info: NavPathInfo, animated?: boolean): Promise<void>;
5261847f8eSopenharmony_ci
5361847f8eSopenharmony_ci  /**
5461847f8eSopenharmony_ci   * Pushes the NavDestination into the stack.
5561847f8eSopenharmony_ci   *
5661847f8eSopenharmony_ci   * @param { string } moduleName - Module name
5761847f8eSopenharmony_ci   * @param { NavPathInfo } info - Indicates the NavDestination to be pushed.
5861847f8eSopenharmony_ci   * @param { NavigationOptions } [options] - Indicates options of stack operation.
5961847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
6061847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
6161847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
6261847f8eSopenharmony_ci   * @atomicservice
6361847f8eSopenharmony_ci   * @since 12
6461847f8eSopenharmony_ci   */
6561847f8eSopenharmony_ci  pushPath(moduleName: string, info: NavPathInfo, options?: NavigationOptions): Promise<void>;
6661847f8eSopenharmony_ci
6761847f8eSopenharmony_ci  /**
6861847f8eSopenharmony_ci   * Pushes the route page into the stack.
6961847f8eSopenharmony_ci   *
7061847f8eSopenharmony_ci   * @param { string } moduleName - Module name
7161847f8eSopenharmony_ci   * @param { NavPathInfo } info - Indicates the route page to be pushed.
7261847f8eSopenharmony_ci   * @param { boolean } [animated] - Indicates whether the transition is animated.
7361847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
7461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
7561847f8eSopenharmony_ci   * <br> 1. Mandatory parameters are left unspecified.
7661847f8eSopenharmony_ci   * <br> 2. Incorrect parameters types.
7761847f8eSopenharmony_ci   * <br> 3. Parameter verification failed.
7861847f8eSopenharmony_ci   * @throws { BusinessError } 100001 - Internal error.
7961847f8eSopenharmony_ci   * @throws { BusinessError } 100005 - Builder function not registered.
8061847f8eSopenharmony_ci   * @throws { BusinessError } 100006 - NavDestination not found.
8161847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
8261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
8361847f8eSopenharmony_ci   * @atomicservice
8461847f8eSopenharmony_ci   * @since 12
8561847f8eSopenharmony_ci   */
8661847f8eSopenharmony_ci  pushDestination(moduleName: string, info: NavPathInfo, animated?: boolean): Promise<void>;
8761847f8eSopenharmony_ci
8861847f8eSopenharmony_ci  /**
8961847f8eSopenharmony_ci   * Pushes the NavDestination into the stack.
9061847f8eSopenharmony_ci   *
9161847f8eSopenharmony_ci   * @param { string } moduleName - Module name
9261847f8eSopenharmony_ci   * @param { NavPathInfo } info - Indicates the NavDestination to be pushed.
9361847f8eSopenharmony_ci   * @param { NavigationOptions } [options] - Indicates options of stack operation.
9461847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
9561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 
9661847f8eSopenharmony_ci   *     1. Mandatory parameters are left unspecified.
9761847f8eSopenharmony_ci   *     2. Incorrect parameters types.
9861847f8eSopenharmony_ci   *     3. Parameter verification failed.
9961847f8eSopenharmony_ci   * @throws { BusinessError } 100001 - Internal error.
10061847f8eSopenharmony_ci   * @throws { BusinessError } 100005 - Builder function not registered.
10161847f8eSopenharmony_ci   * @throws { BusinessError } 100006 - NavDestination not found.
10261847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
10361847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
10461847f8eSopenharmony_ci   * @atomicservice
10561847f8eSopenharmony_ci   * @since 12
10661847f8eSopenharmony_ci   */
10761847f8eSopenharmony_ci  pushDestination(moduleName: string, info: NavPathInfo, options?: NavigationOptions): Promise<void>;
10861847f8eSopenharmony_ci
10961847f8eSopenharmony_ci  /**
11061847f8eSopenharmony_ci   * Pushes the specified route page into the stack.
11161847f8eSopenharmony_ci   *
11261847f8eSopenharmony_ci   * @param { string } moduleName - Module name
11361847f8eSopenharmony_ci   * @param { string } name - Indicates the name of the route page to be pushed.
11461847f8eSopenharmony_ci   * @param { Object } param - Indicates the detailed parameter of the route page to be pushed.
11561847f8eSopenharmony_ci   * @param { boolean } [animated] - Indicates whether the transition is animated.
11661847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
11761847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
11861847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
11961847f8eSopenharmony_ci   * @atomicservice
12061847f8eSopenharmony_ci   * @since 12
12161847f8eSopenharmony_ci   */
12261847f8eSopenharmony_ci  pushPathByName(moduleName: string, name: string, param: Object, animated?: boolean): Promise<void>;
12361847f8eSopenharmony_ci
12461847f8eSopenharmony_ci  /**
12561847f8eSopenharmony_ci   * Pushes the specified route page into the stack.
12661847f8eSopenharmony_ci   *
12761847f8eSopenharmony_ci   * @param { string } moduleName - Module name
12861847f8eSopenharmony_ci   * @param { string } name - Indicates the name of the route page to be pushed.
12961847f8eSopenharmony_ci   * @param { Object } param - Indicates the detailed parameter of the route page to be pushed.
13061847f8eSopenharmony_ci   * @param { Callback<PopInfo> } onPop - The callback when next page returns.
13161847f8eSopenharmony_ci   * @param { boolean } [animated] - Indicates whether the transition is animated.
13261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
13361847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
13461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
13561847f8eSopenharmony_ci   * @atomicservice
13661847f8eSopenharmony_ci   * @since 12
13761847f8eSopenharmony_ci   */
13861847f8eSopenharmony_ci  pushPathByName(moduleName: string, name: string, param: Object,
13961847f8eSopenharmony_ci    onPop: Callback<PopInfo>, animated?: boolean): Promise<void>;
14061847f8eSopenharmony_ci
14161847f8eSopenharmony_ci  /**
14261847f8eSopenharmony_ci   * Pushes the specified route page into the stack.
14361847f8eSopenharmony_ci   *
14461847f8eSopenharmony_ci   * @param { string } moduleName - Module name
14561847f8eSopenharmony_ci   * @param { string } name - Indicates the name of the route page to be pushed.
14661847f8eSopenharmony_ci   * @param { Object } param - Indicates the detailed parameter of the route page to be pushed.
14761847f8eSopenharmony_ci   * @param { boolean } [animated] - Indicates whether the transition is animated.
14861847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
14961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
15061847f8eSopenharmony_ci   * <br> 1. Mandatory parameters are left unspecified.
15161847f8eSopenharmony_ci   * <br> 2. Incorrect parameters types.
15261847f8eSopenharmony_ci   * <br> 3. Parameter verification failed.
15361847f8eSopenharmony_ci   * @throws { BusinessError } 100001 - Internal error.
15461847f8eSopenharmony_ci   * @throws { BusinessError } 100005 - Builder function not registered.
15561847f8eSopenharmony_ci   * @throws { BusinessError } 100006 - NavDestination not found.
15661847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
15761847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
15861847f8eSopenharmony_ci   * @atomicservice
15961847f8eSopenharmony_ci   * @since 12
16061847f8eSopenharmony_ci   */
16161847f8eSopenharmony_ci  pushDestinationByName(moduleName: string, name: string, param: Object, animated?: boolean): Promise<void>;
16261847f8eSopenharmony_ci
16361847f8eSopenharmony_ci  /**
16461847f8eSopenharmony_ci   * Pushes the specified route page into the stack.
16561847f8eSopenharmony_ci   *
16661847f8eSopenharmony_ci   * @param { string } moduleName - Module name
16761847f8eSopenharmony_ci   * @param { string } name - Indicates the name of the route page to be pushed.
16861847f8eSopenharmony_ci   * @param { Object } param - Indicates the detailed parameter of the route page to be pushed.
16961847f8eSopenharmony_ci   * @param { Callback<PopInfo> } onPop - The callback when next page returns.
17061847f8eSopenharmony_ci   * @param { boolean } [animated] - Indicates whether the transition is animated.
17161847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
17261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
17361847f8eSopenharmony_ci   * <br> 1. Mandatory parameters are left unspecified.
17461847f8eSopenharmony_ci   * <br> 2. Incorrect parameters types.
17561847f8eSopenharmony_ci   * <br> 3. Parameter verification failed.
17661847f8eSopenharmony_ci   * @throws { BusinessError } 100001 - Internal error.
17761847f8eSopenharmony_ci   * @throws { BusinessError } 100005 - Builder function not registered.
17861847f8eSopenharmony_ci   * @throws { BusinessError } 100006 - NavDestination not found.
17961847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
18061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
18161847f8eSopenharmony_ci   * @atomicservice
18261847f8eSopenharmony_ci   * @since 12
18361847f8eSopenharmony_ci   */
18461847f8eSopenharmony_ci  pushDestinationByName(moduleName: string, name: string, param: Object,
18561847f8eSopenharmony_ci    onPop: Callback<PopInfo>, animated?: boolean): Promise<void>;
18661847f8eSopenharmony_ci
18761847f8eSopenharmony_ci  /**
18861847f8eSopenharmony_ci   * replace the current page with the specific one.The current page will be destroyed.
18961847f8eSopenharmony_ci   *
19061847f8eSopenharmony_ci   * @param { string } moduleName - Module name
19161847f8eSopenharmony_ci   * @param { NavPathInfo } info - Indicates the the new route page in top of the stack.
19261847f8eSopenharmony_ci   * @param { boolean } [animated] - Indicates whether the transition is animated.
19361847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
19461847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
19561847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
19661847f8eSopenharmony_ci   * @atomicservice
19761847f8eSopenharmony_ci   * @since 12
19861847f8eSopenharmony_ci   */
19961847f8eSopenharmony_ci  replacePath(moduleName: string, info: NavPathInfo, animated?: boolean): Promise<void>;
20061847f8eSopenharmony_ci
20161847f8eSopenharmony_ci  /**
20261847f8eSopenharmony_ci   * Replace the current NavDestination with the specific one.The current NavDestination will be destroyed.
20361847f8eSopenharmony_ci   *
20461847f8eSopenharmony_ci   * @param { string } moduleName - Module name
20561847f8eSopenharmony_ci   * @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack.
20661847f8eSopenharmony_ci   * @param { NavigationOptions } [options] - Indicates options of stack operation.
20761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
20861847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
20961847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
21061847f8eSopenharmony_ci   * @atomicservice
21161847f8eSopenharmony_ci   * @since 12
21261847f8eSopenharmony_ci   */
21361847f8eSopenharmony_ci  replacePath(moduleName: string, info: NavPathInfo, options?: NavigationOptions): Promise<void>;
21461847f8eSopenharmony_ci
21561847f8eSopenharmony_ci  /**
21661847f8eSopenharmony_ci   * replace the current page with the specific one.The current page will be destroyed.
21761847f8eSopenharmony_ci   *
21861847f8eSopenharmony_ci   * @param { string } moduleName - Module name
21961847f8eSopenharmony_ci   * @param { string } name - Indicates name of the new route page in top of stack.
22061847f8eSopenharmony_ci   * @param { Object } param - Indicates the detailed parameter of the new route page in top of the stack.
22161847f8eSopenharmony_ci   * @param { boolean } [animated] - Indicates whether the transition is animated.
22261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
22361847f8eSopenharmony_ci   * @throws { BusinessError } 300001 - hsp silent install fail.
22461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
22561847f8eSopenharmony_ci   * @atomicservice
22661847f8eSopenharmony_ci   * @since 12
22761847f8eSopenharmony_ci   */
22861847f8eSopenharmony_ci  replacePathByName(moduleName: string, name: string, param: Object, animated?: boolean): Promise<void>;
22961847f8eSopenharmony_ci}