• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * The alignment of dialog,
23 *
24 * @enum { number }
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 7
27 */
28/**
29 * The alignment of dialog,
30 *
31 * @enum { number }
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @crossplatform
34 * @since 10
35 */
36/**
37 * The alignment of dialog,
38 *
39 * @enum { number }
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @crossplatform
42 * @atomicservice
43 * @since 11
44 */
45declare enum DialogAlignment {
46  /**
47   * Vertical top alignment.
48   *
49   * @syscap SystemCapability.ArkUI.ArkUI.Full
50   * @since 7
51   */
52  /**
53   * Vertical top alignment.
54   *
55   * @syscap SystemCapability.ArkUI.ArkUI.Full
56   * @crossplatform
57   * @since 10
58   */
59  /**
60   * Vertical top alignment.
61   *
62   * @syscap SystemCapability.ArkUI.ArkUI.Full
63   * @crossplatform
64   * @atomicservice
65   * @since 11
66   */
67  Top,
68
69  /**
70   * Align vertically to the center.
71   *
72   * @syscap SystemCapability.ArkUI.ArkUI.Full
73   * @since 7
74   */
75  /**
76   * Align vertically to the center.
77   *
78   * @syscap SystemCapability.ArkUI.ArkUI.Full
79   * @crossplatform
80   * @since 10
81   */
82  /**
83   * Align vertically to the center.
84   *
85   * @syscap SystemCapability.ArkUI.ArkUI.Full
86   * @crossplatform
87   * @atomicservice
88   * @since 11
89   */
90  Center,
91
92  /**
93   * Vertical bottom alignment.
94   *
95   * @syscap SystemCapability.ArkUI.ArkUI.Full
96   * @since 7
97   */
98  /**
99   * Vertical bottom alignment.
100   *
101   * @syscap SystemCapability.ArkUI.ArkUI.Full
102   * @crossplatform
103   * @since 10
104   */
105  /**
106   * Vertical bottom alignment.
107   *
108   * @syscap SystemCapability.ArkUI.ArkUI.Full
109   * @crossplatform
110   * @atomicservice
111   * @since 11
112   */
113  Bottom,
114
115  /**
116   * Default alignment.
117   *
118   * @syscap SystemCapability.ArkUI.ArkUI.Full
119   * @since 7
120   */
121  /**
122   * Default alignment.
123   *
124   * @syscap SystemCapability.ArkUI.ArkUI.Full
125   * @crossplatform
126   * @since 10
127   */
128  /**
129   * Default alignment.
130   *
131   * @syscap SystemCapability.ArkUI.ArkUI.Full
132   * @crossplatform
133   * @atomicservice
134   * @since 11
135   */
136  Default,
137
138  /**
139   * Align the upper left corner.
140   *
141   * @syscap SystemCapability.ArkUI.ArkUI.Full
142   * @since 8
143   */
144  /**
145   * Align the upper left corner.
146   *
147   * @syscap SystemCapability.ArkUI.ArkUI.Full
148   * @crossplatform
149   * @since 10
150   */
151  /**
152   * Align the upper left corner.
153   *
154   * @syscap SystemCapability.ArkUI.ArkUI.Full
155   * @crossplatform
156   * @atomicservice
157   * @since 11
158   */
159  TopStart,
160
161  /**
162   * Align the upper right corner.
163   *
164   * @syscap SystemCapability.ArkUI.ArkUI.Full
165   * @since 8
166   */
167  /**
168   * Align the upper right corner.
169   *
170   * @syscap SystemCapability.ArkUI.ArkUI.Full
171   * @crossplatform
172   * @since 10
173   */
174  /**
175   * Align the upper right corner.
176   *
177   * @syscap SystemCapability.ArkUI.ArkUI.Full
178   * @crossplatform
179   * @atomicservice
180   * @since 11
181   */
182  TopEnd,
183
184  /**
185   * Left center alignment.
186   *
187   * @syscap SystemCapability.ArkUI.ArkUI.Full
188   * @since 8
189   */
190  /**
191   * Left center alignment.
192   *
193   * @syscap SystemCapability.ArkUI.ArkUI.Full
194   * @crossplatform
195   * @since 10
196   */
197  /**
198   * Left center alignment.
199   *
200   * @syscap SystemCapability.ArkUI.ArkUI.Full
201   * @crossplatform
202   * @atomicservice
203   * @since 11
204   */
205  CenterStart,
206
207  /**
208   * Right center alignment.
209   *
210   * @syscap SystemCapability.ArkUI.ArkUI.Full
211   * @since 8
212   */
213  /**
214   * Right center alignment.
215   *
216   * @syscap SystemCapability.ArkUI.ArkUI.Full
217   * @crossplatform
218   * @since 10
219   */
220  /**
221   * Right center alignment.
222   *
223   * @syscap SystemCapability.ArkUI.ArkUI.Full
224   * @crossplatform
225   * @atomicservice
226   * @since 11
227   */
228  CenterEnd,
229
230  /**
231   * Align the lower left corner.
232   *
233   * @syscap SystemCapability.ArkUI.ArkUI.Full
234   * @since 8
235   */
236  /**
237   * Align the lower left corner.
238   *
239   * @syscap SystemCapability.ArkUI.ArkUI.Full
240   * @crossplatform
241   * @since 10
242   */
243  /**
244   * Align the lower left corner.
245   *
246   * @syscap SystemCapability.ArkUI.ArkUI.Full
247   * @crossplatform
248   * @atomicservice
249   * @since 11
250   */
251  BottomStart,
252
253  /**
254   * Align the lower right corner.
255   *
256   * @syscap SystemCapability.ArkUI.ArkUI.Full
257   * @since 8
258   */
259  /**
260   * Align the lower right corner.
261   *
262   * @syscap SystemCapability.ArkUI.ArkUI.Full
263   * @crossplatform
264   * @since 10
265   */
266  /**
267   * Align the lower right corner.
268   *
269   * @syscap SystemCapability.ArkUI.ArkUI.Full
270   * @crossplatform
271   * @atomicservice
272   * @since 11
273   */
274  BottomEnd,
275}
276
277/**
278* The arrangement of buttons in dialog.
279*
280* @enum { number }
281* @syscap SystemCapability.ArkUI.ArkUI.Full
282* @crossplatform
283* @since 10
284*/
285/**
286* The arrangement of buttons in dialog.
287*
288* @enum { number }
289* @syscap SystemCapability.ArkUI.ArkUI.Full
290* @crossplatform
291* @atomicservice
292* @since 11
293*/
294declare enum DialogButtonDirection {
295  /**
296   * Two or fewer buttons are arranged horizontally,
297   * and two or more buttons are arranged vertically.
298   * @syscap SystemCapability.ArkUI.ArkUI.Full
299   * @crossplatform
300   * @since 10
301   */
302  /**
303   * Two or fewer buttons are arranged horizontally,
304   * and two or more buttons are arranged vertically.
305   * @syscap SystemCapability.ArkUI.ArkUI.Full
306   * @crossplatform
307   * @atomicservice
308   * @since 11
309   */
310  AUTO = 0,
311
312  /**
313   * Buttons are arranged horizontally.
314   *
315   * @syscap SystemCapability.ArkUI.ArkUI.Full
316   * @crossplatform
317   * @since 10
318   */
319  /**
320   * Buttons are arranged horizontally.
321   *
322   * @syscap SystemCapability.ArkUI.ArkUI.Full
323   * @crossplatform
324   * @atomicservice
325   * @since 11
326   */
327  HORIZONTAL = 1,
328
329  /**
330   * Buttons are arranged vertically.
331   *
332   * @syscap SystemCapability.ArkUI.ArkUI.Full
333   * @crossplatform
334   * @since 10
335   */
336  /**
337   * Buttons are arranged vertically.
338   *
339   * @syscap SystemCapability.ArkUI.ArkUI.Full
340   * @crossplatform
341   * @atomicservice
342   * @since 11
343   */
344  VERTICAL = 2,
345}
346
347/**
348 * Base button param.
349 *
350 * @interface AlertDialogButtonBaseOptions
351 * @syscap SystemCapability.ArkUI.ArkUI.Full
352 * @crossplatform
353 * @atomicservice
354 * @since 18
355 */
356declare interface AlertDialogButtonBaseOptions {
357  /**
358   * Enable switch of button.
359   *
360   * @type { ?boolean }
361   * @default true
362   * @syscap SystemCapability.ArkUI.ArkUI.Full
363   * @crossplatform
364   * @since 10
365   */
366  /**
367   * Enable switch of button.
368   *
369   * @type { ?boolean }
370   * @default true
371   * @syscap SystemCapability.ArkUI.ArkUI.Full
372   * @crossplatform
373   * @atomicservice
374   * @since 11
375   */
376  /**
377   * Enable switch of button.
378   * Anonymous Object Rectification.
379   *
380   * @type { ?boolean }
381   * @default true
382   * @syscap SystemCapability.ArkUI.ArkUI.Full
383   * @crossplatform
384   * @atomicservice
385   * @since 18
386   */
387  enabled?: boolean;
388
389  /**
390   * Default focus switch of button.
391   *
392   * @type { ?boolean }
393   * @default false
394   * @syscap SystemCapability.ArkUI.ArkUI.Full
395   * @crossplatform
396   * @since 10
397   */
398  /**
399   * Default focus switch of button.
400   *
401   * @type { ?boolean }
402   * @default false
403   * @syscap SystemCapability.ArkUI.ArkUI.Full
404   * @crossplatform
405   * @atomicservice
406   * @since 11
407   */
408  /**
409   * Default focus switch of button.
410   * Anonymous Object Rectification.
411   *
412   * @type { ?boolean }
413   * @default false
414   * @syscap SystemCapability.ArkUI.ArkUI.Full
415   * @crossplatform
416   * @atomicservice
417   * @since 18
418   */
419  defaultFocus?: boolean;
420
421  /**
422   * Style of button.
423   *
424   * @type { ?DialogButtonStyle }
425   * @default -
426   * @syscap SystemCapability.ArkUI.ArkUI.Full
427   * @crossplatform
428   * @since 10
429   */
430  /**
431   * Style of button.
432   *
433   * @type { ?DialogButtonStyle }
434   * @default -
435   * @syscap SystemCapability.ArkUI.ArkUI.Full
436   * @crossplatform
437   * @atomicservice
438   * @since 11
439   */
440  /**
441   * Style of button.
442   * Anonymous Object Rectification.
443   *
444   * @type { ?DialogButtonStyle }
445   * @default -
446   * @syscap SystemCapability.ArkUI.ArkUI.Full
447   * @crossplatform
448   * @atomicservice
449   * @since 18
450   */
451  style?: DialogButtonStyle;
452
453  /**
454   * Text content of button.
455   *
456   * @type { ResourceStr }
457   * @syscap SystemCapability.ArkUI.ArkUI.Full
458   * @crossplatform
459   * @since 10
460   */
461  /**
462   * Text content of button.
463   *
464   * @type { ResourceStr }
465   * @syscap SystemCapability.ArkUI.ArkUI.Full
466   * @crossplatform
467   * @atomicservice
468   * @since 11
469   */
470  /**
471   * Text content of button.
472   * Anonymous Object Rectification.
473   *
474   * @type { ResourceStr }
475   * @syscap SystemCapability.ArkUI.ArkUI.Full
476   * @crossplatform
477   * @atomicservice
478   * @since 18
479   */
480  value: ResourceStr;
481
482  /**
483   * Text color of button.
484   *
485   * @type { ?ResourceColor }
486   * @syscap SystemCapability.ArkUI.ArkUI.Full
487   * @crossplatform
488   * @since 10
489   */
490  /**
491   * Text color of button.
492   *
493   * @type { ?ResourceColor }
494   * @syscap SystemCapability.ArkUI.ArkUI.Full
495   * @crossplatform
496   * @atomicservice
497   * @since 11
498   */
499  /**
500   * Text color of button.
501   * Anonymous Object Rectification.
502   *
503   * @type { ?ResourceColor }
504   * @syscap SystemCapability.ArkUI.ArkUI.Full
505   * @crossplatform
506   * @atomicservice
507   * @since 18
508   */
509  fontColor?: ResourceColor;
510
511  /**
512   * Background color of button.
513   *
514   * @type { ?ResourceColor }
515   * @syscap SystemCapability.ArkUI.ArkUI.Full
516   * @crossplatform
517   * @since 10
518   */
519  /**
520   * Background color of button.
521   *
522   * @type { ?ResourceColor }
523   * @syscap SystemCapability.ArkUI.ArkUI.Full
524   * @crossplatform
525   * @atomicservice
526   * @since 11
527   */
528  /**
529   * Background color of button.
530   * Anonymous Object Rectification.
531   *
532   * @type { ?ResourceColor }
533   * @syscap SystemCapability.ArkUI.ArkUI.Full
534   * @crossplatform
535   * @atomicservice
536   * @since 18
537   */
538  backgroundColor?: ResourceColor;
539
540  /**
541   * Method executed by the callback.
542   *
543   * @type { function }
544   * @syscap SystemCapability.ArkUI.ArkUI.Full
545   * @crossplatform
546   * @since 10
547   */
548  /**
549   * Method executed by the callback.
550   *
551   * @type { function }
552   * @syscap SystemCapability.ArkUI.ArkUI.Full
553   * @crossplatform
554   * @atomicservice
555   * @since 11
556   */
557  /**
558   * Method executed by the callback.
559   * Anonymous Object Rectification.
560   *
561   * @type { VoidCallback }
562   * @syscap SystemCapability.ArkUI.ArkUI.Full
563   * @crossplatform
564   * @atomicservice
565   * @since 18
566   */
567  action: VoidCallback;
568}
569
570/**
571 * Base button param used for AlertDialogParamWithOptions.
572 *
573 * @extends AlertDialogButtonBaseOptions
574 * @interface AlertDialogButtonOptions
575 * @syscap SystemCapability.ArkUI.ArkUI.Full
576 * @crossplatform
577 * @since 10
578 */
579/**
580 * Base button param used for AlertDialogParamWithOptions.
581 *
582 * @extends AlertDialogButtonBaseOptions
583 * @interface AlertDialogButtonOptions
584 * @syscap SystemCapability.ArkUI.ArkUI.Full
585 * @crossplatform
586 * @atomicservice
587 * @since 11
588 */
589/**
590 * Button param used for AlertDialogParamWithOptions.
591 *
592 * @extends AlertDialogButtonBaseOptions
593 * @interface AlertDialogButtonOptions
594 * @syscap SystemCapability.ArkUI.ArkUI.Full
595 * @crossplatform
596 * @atomicservice
597 * @since 18
598 */
599declare interface AlertDialogButtonOptions extends AlertDialogButtonBaseOptions {
600  /**
601   * Define whether the button responds to Enter/Space key by default.
602   *
603   * @type { ?boolean }
604   * @syscap SystemCapability.ArkUI.ArkUI.Full
605   * @crossplatform
606   * @atomicservice
607   * @since 12
608   */
609  /**
610   * Define whether the button responds to Enter/Space key by default.
611   * Anonymous Object Rectification.
612   *
613   * @type { ?boolean }
614   * @syscap SystemCapability.ArkUI.ArkUI.Full
615   * @crossplatform
616   * @atomicservice
617   * @since 18
618   */
619  primary?: boolean;
620}
621
622/**
623 * Defines TextStyle in the AlertDialog.
624 *
625 * @interface TextStyle
626 * @syscap SystemCapability.ArkUI.ArkUI.Full
627 * @crossplatform
628 * @atomicservice
629 * @since 12
630 */
631declare interface TextStyle {
632  /**
633   * Set the word break type.
634   *
635   * @type { ?WordBreak }
636   * @syscap SystemCapability.ArkUI.ArkUI.Full
637   * @crossplatform
638   * @atomicservice
639   * @since 12
640   */
641  wordBreak?: WordBreak;
642}
643
644/**
645 * Import the LevelOrder type from promptAction.
646 *
647 * @typedef { import('../api/@ohos.promptAction').LevelOrder } LevelOrder
648 * @syscap SystemCapability.ArkUI.ArkUI.Full
649 * @crossplatform
650 * @atomicservice
651 * @since 18
652 */
653declare type LevelOrder = import('../api/@ohos.promptAction').LevelOrder;
654
655/**
656 * Base param used for AlertDialog.show method.
657 *
658 * @interface AlertDialogParam
659 * @syscap SystemCapability.ArkUI.ArkUI.Full
660 * @since 7
661 */
662/**
663 * Base param used for AlertDialog.show method.
664 *
665 * @interface AlertDialogParam
666 * @syscap SystemCapability.ArkUI.ArkUI.Full
667 * @crossplatform
668 * @since 10
669 */
670/**
671 * Base param used for AlertDialog.show method.
672 *
673 * @interface AlertDialogParam
674 * @syscap SystemCapability.ArkUI.ArkUI.Full
675 * @crossplatform
676 * @atomicservice
677 * @since 11
678 */
679declare interface AlertDialogParam {
680  /**
681   * Title Properties
682   *
683   * @type { ?ResourceStr }
684   * @syscap SystemCapability.ArkUI.ArkUI.Full
685   * @since 7
686   */
687  /**
688   * Title Properties
689   *
690   * @type { ?ResourceStr }
691   * @syscap SystemCapability.ArkUI.ArkUI.Full
692   * @crossplatform
693   * @since 10
694   */
695  /**
696   * Title Properties
697   *
698   * @type { ?ResourceStr }
699   * @syscap SystemCapability.ArkUI.ArkUI.Full
700   * @crossplatform
701   * @atomicservice
702   * @since 11
703   */
704  title?: ResourceStr;
705
706  /**
707   * Subtitle Properties
708   * @type { ?ResourceStr }
709   * @syscap SystemCapability.ArkUI.ArkUI.Full
710   * @crossplatform
711   * @since 10
712   */
713  /**
714   * Subtitle Properties
715   * @type { ?ResourceStr }
716   * @syscap SystemCapability.ArkUI.ArkUI.Full
717   * @crossplatform
718   * @atomicservice
719   * @since 11
720   */
721  subtitle?: ResourceStr;
722
723  /**
724   * message Properties
725   *
726   * @type { ResourceStr }
727   * @syscap SystemCapability.ArkUI.ArkUI.Full
728   * @since 7
729   */
730  /**
731   * message Properties
732   *
733   * @type { ResourceStr }
734   * @syscap SystemCapability.ArkUI.ArkUI.Full
735   * @crossplatform
736   * @since 10
737   */
738  /**
739   * message Properties
740   *
741   * @type { ResourceStr }
742   * @syscap SystemCapability.ArkUI.ArkUI.Full
743   * @crossplatform
744   * @atomicservice
745   * @since 11
746   */
747  message: ResourceStr;
748
749  /**
750   * Allows users to click the mask layer to exit.
751   *
752   * @type { ?boolean }
753   * @syscap SystemCapability.ArkUI.ArkUI.Full
754   * @since 7
755   */
756  /**
757   * Allows users to click the mask layer to exit.
758   *
759   * @type { ?boolean }
760   * @syscap SystemCapability.ArkUI.ArkUI.Full
761   * @crossplatform
762   * @since 10
763   */
764  /**
765   * Allows users to click the mask layer to exit.
766   *
767   * @type { ?boolean }
768   * @syscap SystemCapability.ArkUI.ArkUI.Full
769   * @crossplatform
770   * @atomicservice
771   * @since 11
772   */
773  autoCancel?: boolean;
774
775  /**
776   * Execute Cancel Function.
777   *
778   * @type { ?function }
779   * @syscap SystemCapability.ArkUI.ArkUI.Full
780   * @since 7
781   */
782  /**
783   * Execute Cancel Function.
784   *
785   * @type { ?function }
786   * @syscap SystemCapability.ArkUI.ArkUI.Full
787   * @crossplatform
788   * @since 10
789   */
790  /**
791   * Execute Cancel Function.
792   *
793   * @type { ?function }
794   * @syscap SystemCapability.ArkUI.ArkUI.Full
795   * @crossplatform
796   * @atomicservice
797   * @since 11
798   */
799  /**
800   * Execute Cancel Function.
801   * Anonymous Object Rectification.
802   *
803   * @type { ?VoidCallback }
804   * @syscap SystemCapability.ArkUI.ArkUI.Full
805   * @crossplatform
806   * @atomicservice
807   * @since 18
808   */
809  cancel?: VoidCallback;
810
811  /**
812   * Alignment in the vertical direction.
813   *
814   * @type { ?DialogAlignment }
815   * @syscap SystemCapability.ArkUI.ArkUI.Full
816   * @since 7
817   */
818  /**
819   * Alignment in the vertical direction.
820   *
821   * @type { ?DialogAlignment }
822   * @syscap SystemCapability.ArkUI.ArkUI.Full
823   * @crossplatform
824   * @since 10
825   */
826  /**
827   * Alignment in the vertical direction.
828   *
829   * @type { ?DialogAlignment }
830   * @syscap SystemCapability.ArkUI.ArkUI.Full
831   * @crossplatform
832   * @atomicservice
833   * @since 11
834   */
835  alignment?: DialogAlignment;
836
837  /**
838   * Offset of the pop-up window relative to the alignment position.
839   *
840   * @type { ?Offset }
841   * @syscap SystemCapability.ArkUI.ArkUI.Full
842   * @since 7
843   */
844  /**
845   * Offset of the pop-up window relative to the alignment position.
846   *
847   * @type { ?Offset }
848   * @syscap SystemCapability.ArkUI.ArkUI.Full
849   * @crossplatform
850   * @since 10
851   */
852  /**
853   * Offset of the pop-up window relative to the alignment position.
854   *
855   * @type { ?Offset }
856   * @syscap SystemCapability.ArkUI.ArkUI.Full
857   * @crossplatform
858   * @atomicservice
859   * @since 11
860   */
861  offset?: Offset;
862
863  /**
864   * Grid count of dialog.
865   *
866   * @type { ?number }
867   * @syscap SystemCapability.ArkUI.ArkUI.Full
868   * @since 7
869   */
870  /**
871   * Grid count of dialog.
872   *
873   * @type { ?number }
874   * @syscap SystemCapability.ArkUI.ArkUI.Full
875   * @crossplatform
876   * @since 10
877   */
878  /**
879   * Grid count of dialog.
880   *
881   * @type { ?number }
882   * @syscap SystemCapability.ArkUI.ArkUI.Full
883   * @crossplatform
884   * @atomicservice
885   * @since 11
886   */
887  gridCount?: number;
888
889  /**
890   * Mask Region of dialog. The size cannot exceed the main window.
891   *
892   * @type { ?Rectangle }
893   * @syscap SystemCapability.ArkUI.ArkUI.Full
894   * @crossplatform
895   * @since 10
896   */
897  /**
898   * Mask Region of dialog. The size cannot exceed the main window.
899   *
900   * @type { ?Rectangle }
901   * @syscap SystemCapability.ArkUI.ArkUI.Full
902   * @crossplatform
903   * @atomicservice
904   * @since 11
905   */
906  maskRect?: Rectangle;
907
908  /**
909   * Whether to display in the sub window.
910   *
911   * @type { ?boolean }
912   * @default false
913   * @syscap SystemCapability.ArkUI.ArkUI.Full
914   * @crossplatform
915   * @since 11
916   */
917  /**
918   * Whether to display in the sub window.
919   *
920   * @type { ?boolean }
921   * @default false
922   * @syscap SystemCapability.ArkUI.ArkUI.Full
923   * @crossplatform
924   * @atomicservice
925   * @since 12
926   */
927  showInSubWindow?: boolean;
928
929  /**
930   * Whether it is a modal dialog
931   * @type { ?boolean }
932   * @default true
933   * @syscap SystemCapability.ArkUI.ArkUI.Full
934   * @crossplatform
935   * @since 11
936   */
937  /**
938   * Whether it is a modal dialog
939   * @type { ?boolean }
940   * @default true
941   * @syscap SystemCapability.ArkUI.ArkUI.Full
942   * @crossplatform
943   * @atomicservice
944   * @since 12
945   */
946  isModal?: boolean;
947
948  /**
949   * Defines the alertDialog's background color
950   *
951   * @type { ?ResourceColor }
952   * @default Color.Transparent
953   * @syscap SystemCapability.ArkUI.ArkUI.Full
954   * @crossplatform
955   * @since 11
956   */
957  /**
958   * Defines the alertDialog's background color
959   *
960   * @type { ?ResourceColor }
961   * @default Color.Transparent
962   * @syscap SystemCapability.ArkUI.ArkUI.Full
963   * @crossplatform
964   * @atomicservice
965   * @since 12
966   */
967  backgroundColor?: ResourceColor;
968
969  /**
970   * Defines the alertDialog's background blur Style
971   *
972   * @type { ?BlurStyle }
973   * @default BlurStyle.COMPONENT_ULTRA_THICK
974   * @syscap SystemCapability.ArkUI.ArkUI.Full
975   * @crossplatform
976   * @since 11
977   */
978  /**
979   * Defines the alertDialog's background blur Style
980   *
981   * @type { ?BlurStyle }
982   * @default BlurStyle.COMPONENT_ULTRA_THICK
983   * @syscap SystemCapability.ArkUI.ArkUI.Full
984   * @crossplatform
985   * @atomicservice
986   * @since 12
987   */
988  backgroundBlurStyle?: BlurStyle;
989
990  /**
991   * Callback function when the dialog interactive dismiss
992   *
993   * @type { ?Callback<DismissDialogAction> }
994   * @syscap SystemCapability.ArkUI.ArkUI.Full
995   * @crossplatform
996   * @atomicservice
997   * @since 12
998   */
999  onWillDismiss?: Callback<DismissDialogAction>;
1000
1001  /**
1002   * Transition parameters of opening/closing AlertDialog.
1003   *
1004   * @type { ?TransitionEffect }
1005   * @syscap SystemCapability.ArkUI.ArkUI.Full
1006   * @crossplatform
1007   * @atomicservice
1008   * @since 12
1009   */
1010  transition?: TransitionEffect;
1011
1012  /**
1013   * Defines the alertDialog's corner radius.
1014   *
1015   * @type { ?(Dimension | BorderRadiuses | LocalizedBorderRadiuses) }
1016   * @syscap SystemCapability.ArkUI.ArkUI.Full
1017   * @crossplatform
1018   * @atomicservice
1019   * @since 12
1020   */
1021  cornerRadius?: Dimension | BorderRadiuses | LocalizedBorderRadiuses;
1022
1023  /**
1024   * Defines the alertDialog's width.
1025   *
1026   * @type { ?Dimension }
1027   * @syscap SystemCapability.ArkUI.ArkUI.Full
1028   * @crossplatform
1029   * @atomicservice
1030   * @since 12
1031   */
1032  width?: Dimension;
1033
1034  /**
1035   * Defines the alertDialog's height.
1036   *
1037   * @type { ?Dimension }
1038   * @syscap SystemCapability.ArkUI.ArkUI.Full
1039   * @crossplatform
1040   * @atomicservice
1041   * @since 12
1042   */
1043  height?: Dimension;
1044
1045  /**
1046   * Defines the alertDialog's border width.
1047   *
1048   * @type { ?(Dimension | EdgeWidths | LocalizedEdgeWidths) }
1049   * @syscap SystemCapability.ArkUI.ArkUI.Full
1050   * @crossplatform
1051   * @atomicservice
1052   * @since 12
1053   */
1054  borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths;
1055
1056  /**
1057   * Defines the alertDialog's border color.
1058   *
1059   * @type { ?(ResourceColor | EdgeColors | LocalizedEdgeColors) }
1060   * @syscap SystemCapability.ArkUI.ArkUI.Full
1061   * @crossplatform
1062   * @atomicservice
1063   * @since 12
1064   */
1065  borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors;
1066
1067  /**
1068   * Defines the alertDialog's border style.
1069   *
1070   * @type { ?(BorderStyle | EdgeStyles) }
1071   * @syscap SystemCapability.ArkUI.ArkUI.Full
1072   * @crossplatform
1073   * @atomicservice
1074   * @since 12
1075   */
1076  borderStyle?: BorderStyle | EdgeStyles;
1077
1078  /**
1079   * Defines the alertDialog's shadow.
1080   *
1081   * @type { ?(ShadowOptions | ShadowStyle) }
1082   * @syscap SystemCapability.ArkUI.ArkUI.Full
1083   * @crossplatform
1084   * @atomicservice
1085   * @since 12
1086   */
1087  shadow?: ShadowOptions | ShadowStyle;
1088
1089  /**
1090   * Set the alertDialog's textStyle.
1091   *
1092   * @type { ?TextStyle }
1093   * @syscap SystemCapability.ArkUI.ArkUI.Full
1094   * @crossplatform
1095   * @atomicservice
1096   * @since 12
1097   */
1098  textStyle?: TextStyle;
1099
1100  /**
1101   * Defines whether to respond to the hover mode.
1102   *
1103   * @type { ?boolean }
1104   * @default false
1105   * @syscap SystemCapability.ArkUI.ArkUI.Full
1106   * @crossplatform
1107   * @atomicservice
1108   * @since 14
1109   */
1110  enableHoverMode?: boolean;
1111
1112  /**
1113   * Defines the alertDialog's display area in hover mode.
1114   *
1115   * @type { ?HoverModeAreaType }
1116   * @default HoverModeAreaType.BOTTOM_SCREEN
1117   * @syscap SystemCapability.ArkUI.ArkUI.Full
1118   * @crossplatform
1119   * @atomicservice
1120   * @since 14
1121   */
1122  hoverModeArea?: HoverModeAreaType;
1123
1124  /**
1125   * Determine the display level of the dialog.
1126   *
1127   * @type { ?LevelMode }
1128   * @default LevelMode.OVERLAY
1129   * @syscap SystemCapability.ArkUI.ArkUI.Full
1130   * @crossplatform
1131   * @atomicservice
1132   * @since 15
1133   */
1134  levelMode?: LevelMode;
1135
1136  /**
1137   * The uniqueId of any node in the router or navigation page.
1138   *
1139   * @type { ?number }
1140   * @syscap SystemCapability.ArkUI.ArkUI.Full
1141   * @crossplatform
1142   * @atomicservice
1143   * @since 15
1144   */
1145  levelUniqueId?: number;
1146
1147  /**
1148   * Determine the immersive mode of the dialog.
1149   *
1150   * @type { ?ImmersiveMode }
1151   * @default ImmersiveMode.DEFAULT
1152   * @syscap SystemCapability.ArkUI.ArkUI.Full
1153   * @crossplatform
1154   * @atomicservice
1155   * @since 15
1156   */
1157  immersiveMode?: ImmersiveMode;
1158
1159  /**
1160   * Determine the display order of the dialog.
1161   *
1162   * @type { ?LevelOrder }
1163   * @default The value returns by LevelOrder.clamp(0)
1164   * @syscap SystemCapability.ArkUI.ArkUI.Full
1165   * @crossplatform
1166   * @atomicservice
1167   * @since 18
1168   */
1169  levelOrder?: LevelOrder;
1170}
1171
1172/**
1173 * Defines the AlertDialog with confirm button.
1174 *
1175 * @extends AlertDialogParam
1176 * @interface AlertDialogParamWithConfirm
1177 * @syscap SystemCapability.ArkUI.ArkUI.Full
1178 * @since 7
1179 */
1180/**
1181 * Defines the AlertDialog with confirm button.
1182 *
1183 * @extends AlertDialogParam
1184 * @interface AlertDialogParamWithConfirm
1185 * @syscap SystemCapability.ArkUI.ArkUI.Full
1186 * @crossplatform
1187 * @since 10
1188 */
1189/**
1190 * Defines the AlertDialog with confirm button.
1191 *
1192 * @extends AlertDialogParam
1193 * @interface AlertDialogParamWithConfirm
1194 * @syscap SystemCapability.ArkUI.ArkUI.Full
1195 * @crossplatform
1196 * @atomicservice
1197 * @since 11
1198 */
1199declare interface AlertDialogParamWithConfirm extends AlertDialogParam {
1200  /**
1201   * Invoke the commit function.
1202   *
1203   * @type { ?object }
1204   * @syscap SystemCapability.ArkUI.ArkUI.Full
1205   * @since 7
1206   */
1207  /**
1208   * Invoke the commit function.
1209   *
1210   * @type { ?object }
1211   * @syscap SystemCapability.ArkUI.ArkUI.Full
1212   * @crossplatform
1213   * @since 10
1214   */
1215  /**
1216   * Invoke the commit function.
1217   *
1218   * @type { ?object }
1219   * @syscap SystemCapability.ArkUI.ArkUI.Full
1220   * @crossplatform
1221   * @atomicservice
1222   * @since 11
1223   */
1224  /**
1225   * Invoke the commit function.
1226   * Anonymous Object Rectification.
1227   *
1228   * @type { ?AlertDialogButtonBaseOptions }
1229   * @syscap SystemCapability.ArkUI.ArkUI.Full
1230   * @crossplatform
1231   * @atomicservice
1232   * @since 18
1233   */
1234  confirm?: AlertDialogButtonBaseOptions;
1235}
1236
1237/**
1238 * Component dialog dismiss action.
1239 *
1240 * @interface DismissDialogAction
1241 * @syscap SystemCapability.ArkUI.ArkUI.Full
1242 * @crossplatform
1243 * @atomicservice
1244 * @since 12
1245 */
1246declare interface DismissDialogAction {
1247  /**
1248   * Defines dialog dismiss function.
1249   *
1250   * @type { Callback<void> }
1251   * @syscap SystemCapability.ArkUI.ArkUI.Full
1252   * @crossplatform
1253   * @atomicservice
1254   * @since 12
1255   */
1256  dismiss: Callback<void>;
1257
1258  /**
1259   * Dismiss reason type.
1260   *
1261   * @type { DismissReason }
1262   * @syscap SystemCapability.ArkUI.ArkUI.Full
1263   * @crossplatform
1264   * @atomicservice
1265   * @since 12
1266   */
1267  reason: DismissReason;
1268}
1269
1270/**
1271 * Defines the dialog param with buttons.
1272 *
1273 * @extends AlertDialogParam
1274 * @interface AlertDialogParamWithButtons
1275 * @syscap SystemCapability.ArkUI.ArkUI.Full
1276 * @since 7
1277 */
1278/**
1279 * Defines the dialog param with buttons.
1280 *
1281 * @extends AlertDialogParam
1282 * @interface AlertDialogParamWithButtons
1283 * @syscap SystemCapability.ArkUI.ArkUI.Full
1284 * @crossplatform
1285 * @since 10
1286 */
1287/**
1288 * Defines the dialog param with buttons.
1289 *
1290 * @extends AlertDialogParam
1291 * @interface AlertDialogParamWithButtons
1292 * @syscap SystemCapability.ArkUI.ArkUI.Full
1293 * @crossplatform
1294 * @atomicservice
1295 * @since 11
1296 */
1297declare interface AlertDialogParamWithButtons extends AlertDialogParam {
1298  /**
1299   * First button.
1300   *
1301   * @type { object }
1302   * @syscap SystemCapability.ArkUI.ArkUI.Full
1303   * @since 7
1304   */
1305  /**
1306   * First button.
1307   *
1308   * @type { object }
1309   * @syscap SystemCapability.ArkUI.ArkUI.Full
1310   * @crossplatform
1311   * @since 10
1312   */
1313  /**
1314   * First button.
1315   *
1316   * @type { object }
1317   * @syscap SystemCapability.ArkUI.ArkUI.Full
1318   * @crossplatform
1319   * @atomicservice
1320   * @since 11
1321   */
1322  /**
1323   * First button.
1324   * Anonymous Object Rectification.
1325   *
1326   * @type { AlertDialogButtonBaseOptions }
1327   * @syscap SystemCapability.ArkUI.ArkUI.Full
1328   * @crossplatform
1329   * @atomicservice
1330   * @since 18
1331   */
1332  primaryButton: AlertDialogButtonBaseOptions;
1333
1334  /**
1335   * Second button.
1336   *
1337   * @type { object }
1338   * @syscap SystemCapability.ArkUI.ArkUI.Full
1339   * @since 7
1340   */
1341  /**
1342   * Second button.
1343   *
1344   * @type { object }
1345   * @syscap SystemCapability.ArkUI.ArkUI.Full
1346   * @crossplatform
1347   * @since 10
1348   */
1349  /**
1350   * Second button.
1351   *
1352   * @type { object }
1353   * @syscap SystemCapability.ArkUI.ArkUI.Full
1354   * @crossplatform
1355   * @atomicservice
1356   * @since 11
1357   */
1358  /**
1359   * Second button.
1360   * Anonymous Object Rectification.
1361   *
1362   * @type { AlertDialogButtonBaseOptions }
1363   * @syscap SystemCapability.ArkUI.ArkUI.Full
1364   * @crossplatform
1365   * @atomicservice
1366   * @since 18
1367   */
1368  secondaryButton: AlertDialogButtonBaseOptions;
1369}
1370
1371/**
1372 * Defines the dialog param with options.
1373 *
1374 * @extends AlertDialogParam
1375 * @interface AlertDialogParamWithOptions
1376 * @syscap SystemCapability.ArkUI.ArkUI.Full
1377 * @crossplatform
1378 * @since 10
1379 */
1380/**
1381 * Defines the dialog param with options.
1382 *
1383 * @extends AlertDialogParam
1384 * @interface AlertDialogParamWithOptions
1385 * @syscap SystemCapability.ArkUI.ArkUI.Full
1386 * @crossplatform
1387 * @atomicservice
1388 * @since 11
1389 */
1390declare interface AlertDialogParamWithOptions extends AlertDialogParam {
1391  /**
1392   * The array of buttons.
1393   * @type { Array<AlertDialogButtonOptions> }
1394   * @syscap SystemCapability.ArkUI.ArkUI.Full
1395   * @crossplatform
1396   * @since 10
1397   */
1398  /**
1399   * The array of buttons.
1400   * @type { Array<AlertDialogButtonOptions> }
1401   * @syscap SystemCapability.ArkUI.ArkUI.Full
1402   * @crossplatform
1403   * @atomicservice
1404   * @since 11
1405   */
1406  buttons: Array<AlertDialogButtonOptions>;
1407
1408  /**
1409   * The arrangement of buttons.
1410   * @type { ?DialogButtonDirection }
1411   * @default DialogButtonDirection.AUTO
1412   * @syscap SystemCapability.ArkUI.ArkUI.Full
1413   * @crossplatform
1414   * @since 10
1415   */
1416  /**
1417   * The arrangement of buttons.
1418   * @type { ?DialogButtonDirection }
1419   * @default DialogButtonDirection.AUTO
1420   * @syscap SystemCapability.ArkUI.ArkUI.Full
1421   * @crossplatform
1422   * @atomicservice
1423   * @since 11
1424   */
1425  buttonDirection?: DialogButtonDirection;
1426}
1427
1428/**
1429 * Defines AlertDialog which uses show method to show alert dialog.
1430 *
1431 * @syscap SystemCapability.ArkUI.ArkUI.Full
1432 * @since 7
1433 */
1434/**
1435 * Defines AlertDialog which uses show method to show alert dialog.
1436 *
1437 * @syscap SystemCapability.ArkUI.ArkUI.Full
1438 * @crossplatform
1439 * @since 10
1440 */
1441/**
1442 * Defines AlertDialog which uses show method to show alert dialog.
1443 *
1444 * @syscap SystemCapability.ArkUI.ArkUI.Full
1445 * @crossplatform
1446 * @atomicservice
1447 * @since 11
1448 */
1449declare class AlertDialog {
1450  /**
1451   * Invoking method display.
1452   *
1453   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons } value
1454   * @syscap SystemCapability.ArkUI.ArkUI.Full
1455   * @since 7
1456   */
1457  /**
1458   * Invoking method display.
1459   *
1460   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions} value
1461   * @syscap SystemCapability.ArkUI.ArkUI.Full
1462   * @crossplatform
1463   * @since 10
1464   */
1465  /**
1466   * Invoking method display.
1467   *
1468   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions} value
1469   * @syscap SystemCapability.ArkUI.ArkUI.Full
1470   * @crossplatform
1471   * @atomicservice
1472   * @since 11
1473   * @deprecated since 18
1474   * @useinstead ohos.arkui.UIContext.UIContext#showAlertDialog
1475   */
1476  static show(value: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions);
1477}
1478
1479