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/license/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 * @file This section describes the interfaces used by InterstitialDialogAction
1761847f8eSopenharmony_ci * @kit ArkUI
1861847f8eSopenharmony_ci */
1961847f8eSopenharmony_ci
2061847f8eSopenharmony_ciimport { UIContext } from '@ohos.arkui.UIContext';
2161847f8eSopenharmony_ciimport { ComponentContent } from '@ohos.arkui.node';
2261847f8eSopenharmony_ci/**
2361847f8eSopenharmony_ci * IconStyle enumeration description.
2461847f8eSopenharmony_ci *
2561847f8eSopenharmony_ci * @enum { number }
2661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
2761847f8eSopenharmony_ci * @atomicservice
2861847f8eSopenharmony_ci * @since 12
2961847f8eSopenharmony_ci */
3061847f8eSopenharmony_ciexport declare enum IconStyle {
3161847f8eSopenharmony_ci    /**
3261847f8eSopenharmony_ci     * Sets the button icon to dark.
3361847f8eSopenharmony_ci     *
3461847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
3561847f8eSopenharmony_ci     * @atomicservice
3661847f8eSopenharmony_ci     * @since 12
3761847f8eSopenharmony_ci     */
3861847f8eSopenharmony_ci    DARK = 0,
3961847f8eSopenharmony_ci    /**
4061847f8eSopenharmony_ci     * Sets the button icon to light.
4161847f8eSopenharmony_ci     *
4261847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
4361847f8eSopenharmony_ci     * @atomicservice
4461847f8eSopenharmony_ci     * @since 12
4561847f8eSopenharmony_ci     */
4661847f8eSopenharmony_ci    LIGHT = 1
4761847f8eSopenharmony_ci}
4861847f8eSopenharmony_ci/**
4961847f8eSopenharmony_ci * TitlePosition enumeration description.
5061847f8eSopenharmony_ci *
5161847f8eSopenharmony_ci * @enum { number }
5261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
5361847f8eSopenharmony_ci * @atomicservice
5461847f8eSopenharmony_ci * @since 12
5561847f8eSopenharmony_ci */
5661847f8eSopenharmony_ciexport declare enum TitlePosition {
5761847f8eSopenharmony_ci    /**
5861847f8eSopenharmony_ci     * The main title is above the text content.
5961847f8eSopenharmony_ci     *
6061847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
6161847f8eSopenharmony_ci     * @atomicservice
6261847f8eSopenharmony_ci     * @since 12
6361847f8eSopenharmony_ci     */
6461847f8eSopenharmony_ci    TOP = 0,
6561847f8eSopenharmony_ci    /**
6661847f8eSopenharmony_ci     * The main title is below the text content.
6761847f8eSopenharmony_ci     *
6861847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
6961847f8eSopenharmony_ci     * @atomicservice
7061847f8eSopenharmony_ci     * @since 12
7161847f8eSopenharmony_ci     */
7261847f8eSopenharmony_ci    BOTTOM = 1
7361847f8eSopenharmony_ci}
7461847f8eSopenharmony_ci/**
7561847f8eSopenharmony_ci * dialog relative to bottom distance if tabs are present.
7661847f8eSopenharmony_ci *
7761847f8eSopenharmony_ci * @enum { number }
7861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
7961847f8eSopenharmony_ci * @atomicservice
8061847f8eSopenharmony_ci * @since 12
8161847f8eSopenharmony_ci */
8261847f8eSopenharmony_ciexport declare enum BottomOffset {
8361847f8eSopenharmony_ci    /**
8461847f8eSopenharmony_ci     * dialog distance relative to the bottom in the presence of tabs.
8561847f8eSopenharmony_ci     *
8661847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
8761847f8eSopenharmony_ci     * @atomicservice
8861847f8eSopenharmony_ci     * @since 12
8961847f8eSopenharmony_ci     */
9061847f8eSopenharmony_ci    OFFSET_FOR_BAR = 0,
9161847f8eSopenharmony_ci    /**
9261847f8eSopenharmony_ci     * dialog is the distance relative to the bottom without tabs.
9361847f8eSopenharmony_ci     *
9461847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
9561847f8eSopenharmony_ci     * @atomicservice
9661847f8eSopenharmony_ci     * @since 12
9761847f8eSopenharmony_ci     */
9861847f8eSopenharmony_ci    OFFSET_FOR_NONE = 1
9961847f8eSopenharmony_ci}
10061847f8eSopenharmony_ci/**
10161847f8eSopenharmony_ci * Defines the properties required by the dialog.
10261847f8eSopenharmony_ci *
10361847f8eSopenharmony_ci * @interface DialogOptions
10461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
10561847f8eSopenharmony_ci * @atomicservice
10661847f8eSopenharmony_ci * @since 12
10761847f8eSopenharmony_ci */
10861847f8eSopenharmony_ciexport declare interface DialogOptions {
10961847f8eSopenharmony_ci    /**
11061847f8eSopenharmony_ci     * The UIContext required by the dialog.
11161847f8eSopenharmony_ci     *
11261847f8eSopenharmony_ci     * @type { UIContext }
11361847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
11461847f8eSopenharmony_ci     * @atomicservice
11561847f8eSopenharmony_ci     * @since 12
11661847f8eSopenharmony_ci     */
11761847f8eSopenharmony_ci    uiContext: UIContext;
11861847f8eSopenharmony_ci    /**
11961847f8eSopenharmony_ci     * The type of the bottom offset.
12061847f8eSopenharmony_ci     *
12161847f8eSopenharmony_ci     * @type { ?BottomOffset }
12261847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
12361847f8eSopenharmony_ci     * @atomicservice
12461847f8eSopenharmony_ci     * @since 12
12561847f8eSopenharmony_ci     */
12661847f8eSopenharmony_ci    bottomOffsetType?: BottomOffset
12761847f8eSopenharmony_ci    /**
12861847f8eSopenharmony_ci     * The title of the dialog.
12961847f8eSopenharmony_ci     *
13061847f8eSopenharmony_ci     * @type { ?ResourceStr }
13161847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
13261847f8eSopenharmony_ci     * @atomicservice
13361847f8eSopenharmony_ci     * @since 12
13461847f8eSopenharmony_ci     */
13561847f8eSopenharmony_ci    title?: ResourceStr;
13661847f8eSopenharmony_ci    /**
13761847f8eSopenharmony_ci     * The subtitle of the dialog.
13861847f8eSopenharmony_ci     *
13961847f8eSopenharmony_ci     * @type { ?ResourceStr }
14061847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
14161847f8eSopenharmony_ci     * @atomicservice
14261847f8eSopenharmony_ci     * @since 12
14361847f8eSopenharmony_ci     */
14461847f8eSopenharmony_ci    subtitle?: ResourceStr;
14561847f8eSopenharmony_ci    /**
14661847f8eSopenharmony_ci     * The color of the title.
14761847f8eSopenharmony_ci     *
14861847f8eSopenharmony_ci     * @type { ?(ResourceStr | Color) }
14961847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
15061847f8eSopenharmony_ci     * @atomicservice
15161847f8eSopenharmony_ci     * @since 12
15261847f8eSopenharmony_ci     */
15361847f8eSopenharmony_ci    titleColor?: ResourceStr | Color;
15461847f8eSopenharmony_ci    /**
15561847f8eSopenharmony_ci     * The color of the subtitle.
15661847f8eSopenharmony_ci     *
15761847f8eSopenharmony_ci     * @type { ?(ResourceStr | Color) }
15861847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
15961847f8eSopenharmony_ci     * @atomicservice
16061847f8eSopenharmony_ci     * @since 12
16161847f8eSopenharmony_ci     */
16261847f8eSopenharmony_ci    subtitleColor?: ResourceStr | Color;
16361847f8eSopenharmony_ci    /**
16461847f8eSopenharmony_ci     * The background of the dialog.
16561847f8eSopenharmony_ci     *
16661847f8eSopenharmony_ci     * @type { ?Resource }
16761847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
16861847f8eSopenharmony_ci     * @atomicservice
16961847f8eSopenharmony_ci     * @since 12
17061847f8eSopenharmony_ci     */
17161847f8eSopenharmony_ci    backgroundImage?: Resource;
17261847f8eSopenharmony_ci    /**
17361847f8eSopenharmony_ci     * The foreground of the dialog.
17461847f8eSopenharmony_ci     *
17561847f8eSopenharmony_ci     * @type { ?Resource }
17661847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
17761847f8eSopenharmony_ci     * @atomicservice
17861847f8eSopenharmony_ci     * @since 12
17961847f8eSopenharmony_ci     */
18061847f8eSopenharmony_ci    foregroundImage?: Resource;
18161847f8eSopenharmony_ci    /**
18261847f8eSopenharmony_ci     * The style of the close button.
18361847f8eSopenharmony_ci     *
18461847f8eSopenharmony_ci     * @type { ?IconStyle }
18561847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
18661847f8eSopenharmony_ci     * @atomicservice
18761847f8eSopenharmony_ci     * @since 12
18861847f8eSopenharmony_ci     */
18961847f8eSopenharmony_ci    iconStyle?: IconStyle;
19061847f8eSopenharmony_ci    /**
19161847f8eSopenharmony_ci     * The relative position of the title and subtitle.
19261847f8eSopenharmony_ci     *
19361847f8eSopenharmony_ci     * @type { ?TitlePosition }
19461847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
19561847f8eSopenharmony_ci     * @atomicservice
19661847f8eSopenharmony_ci     * @since 12
19761847f8eSopenharmony_ci     */
19861847f8eSopenharmony_ci    titlePosition?: TitlePosition;
19961847f8eSopenharmony_ci    /**
20061847f8eSopenharmony_ci     * The action after clicking dialog.
20161847f8eSopenharmony_ci     *
20261847f8eSopenharmony_ci     * @type { ?Callback<void> }
20361847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
20461847f8eSopenharmony_ci     * @atomicservice
20561847f8eSopenharmony_ci     * @since 12
20661847f8eSopenharmony_ci     */
20761847f8eSopenharmony_ci    onDialogClick?: Callback<void>;
20861847f8eSopenharmony_ci    /**
20961847f8eSopenharmony_ci     * The action after clicking close button.
21061847f8eSopenharmony_ci     *
21161847f8eSopenharmony_ci     * @type { ?Callback<void> }
21261847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
21361847f8eSopenharmony_ci     * @atomicservice
21461847f8eSopenharmony_ci     * @since 12
21561847f8eSopenharmony_ci     */
21661847f8eSopenharmony_ci    onDialogClose?: Callback<void>;
21761847f8eSopenharmony_ci}
21861847f8eSopenharmony_ci/**
21961847f8eSopenharmony_ci * Declare dialog action.
22061847f8eSopenharmony_ci *
22161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
22261847f8eSopenharmony_ci * @atomicservice
22361847f8eSopenharmony_ci * @since 12
22461847f8eSopenharmony_ci */
22561847f8eSopenharmony_ciexport declare class InterstitialDialogAction {
22661847f8eSopenharmony_ci    /**
22761847f8eSopenharmony_ci     * The constructor transfers parameter settings.
22861847f8eSopenharmony_ci     *
22961847f8eSopenharmony_ci     * @param { DialogOptions } dialogOptions - Creates a new dialog action object.
23061847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
23161847f8eSopenharmony_ci     * @atomicservice
23261847f8eSopenharmony_ci     * @since 12
23361847f8eSopenharmony_ci     */
23461847f8eSopenharmony_ci    constructor(dialogOptions: DialogOptions);
23561847f8eSopenharmony_ci    /**
23661847f8eSopenharmony_ci     * Execute a dialog open event.
23761847f8eSopenharmony_ci     *
23861847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
23961847f8eSopenharmony_ci     * @atomicservice
24061847f8eSopenharmony_ci     * @since 12
24161847f8eSopenharmony_ci     */
24261847f8eSopenharmony_ci    openDialog(): void;
24361847f8eSopenharmony_ci    /**
24461847f8eSopenharmony_ci     * Execute a dialog close event.
24561847f8eSopenharmony_ci     *
24661847f8eSopenharmony_ci     * @syscap SystemCapability.ArkUI.ArkUI.Full
24761847f8eSopenharmony_ci     * @atomicservice
24861847f8eSopenharmony_ci     * @since 12
24961847f8eSopenharmony_ci     */
25061847f8eSopenharmony_ci    closeDialog(): void;
25161847f8eSopenharmony_ci}