• 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 used for AlertDialogParamWithOptions.
349 *
350 * @interface AlertDialogButtonOptions
351 * @syscap SystemCapability.ArkUI.ArkUI.Full
352 * @crossplatform
353 * @since 10
354 */
355/**
356 * Base button param used for AlertDialogParamWithOptions.
357 *
358 * @interface AlertDialogButtonOptions
359 * @syscap SystemCapability.ArkUI.ArkUI.Full
360 * @crossplatform
361 * @atomicservice
362 * @since 11
363 */
364declare interface AlertDialogButtonOptions {
365  /**
366   * Enable switch of button.
367   *
368   * @type { ?boolean }
369   * @default true
370   * @syscap SystemCapability.ArkUI.ArkUI.Full
371   * @crossplatform
372   * @since 10
373   */
374  /**
375   * Enable switch of button.
376   *
377   * @type { ?boolean }
378   * @default true
379   * @syscap SystemCapability.ArkUI.ArkUI.Full
380   * @crossplatform
381   * @atomicservice
382   * @since 11
383   */
384  enabled?: boolean;
385
386  /**
387   * Default focus switch of button.
388   *
389   * @type { ?boolean }
390   * @default false
391   * @syscap SystemCapability.ArkUI.ArkUI.Full
392   * @crossplatform
393   * @since 10
394   */
395  /**
396   * Default focus switch of button.
397   *
398   * @type { ?boolean }
399   * @default false
400   * @syscap SystemCapability.ArkUI.ArkUI.Full
401   * @crossplatform
402   * @atomicservice
403   * @since 11
404   */
405  defaultFocus?: boolean;
406
407  /**
408   * Style of button.
409   *
410   * @type { ?DialogButtonStyle }
411   * @default -
412   * @syscap SystemCapability.ArkUI.ArkUI.Full
413   * @crossplatform
414   * @since 10
415   */
416  /**
417   * Style of button.
418   *
419   * @type { ?DialogButtonStyle }
420   * @default -
421   * @syscap SystemCapability.ArkUI.ArkUI.Full
422   * @crossplatform
423   * @atomicservice
424   * @since 11
425   */
426  style?: DialogButtonStyle;
427
428  /**
429   * Text content of button.
430   *
431   * @type { ResourceStr }
432   * @syscap SystemCapability.ArkUI.ArkUI.Full
433   * @crossplatform
434   * @since 10
435   */
436  /**
437   * Text content of button.
438   *
439   * @type { ResourceStr }
440   * @syscap SystemCapability.ArkUI.ArkUI.Full
441   * @crossplatform
442   * @atomicservice
443   * @since 11
444   */
445  value: ResourceStr;
446
447  /**
448   * Text color of button.
449   *
450   * @type { ?ResourceColor }
451   * @syscap SystemCapability.ArkUI.ArkUI.Full
452   * @crossplatform
453   * @since 10
454   */
455  /**
456   * Text color of button.
457   *
458   * @type { ?ResourceColor }
459   * @syscap SystemCapability.ArkUI.ArkUI.Full
460   * @crossplatform
461   * @atomicservice
462   * @since 11
463   */
464  fontColor?: ResourceColor;
465
466  /**
467   * Background color of button.
468   *
469   * @type { ?ResourceColor }
470   * @syscap SystemCapability.ArkUI.ArkUI.Full
471   * @crossplatform
472   * @since 10
473   */
474  /**
475   * Background color of button.
476   *
477   * @type { ?ResourceColor }
478   * @syscap SystemCapability.ArkUI.ArkUI.Full
479   * @crossplatform
480   * @atomicservice
481   * @since 11
482   */
483  backgroundColor?: ResourceColor;
484
485  /**
486   * Method executed by the callback.
487   *
488   * @type { function }
489   * @syscap SystemCapability.ArkUI.ArkUI.Full
490   * @crossplatform
491   * @since 10
492   */
493  /**
494   * Method executed by the callback.
495   *
496   * @type { function }
497   * @syscap SystemCapability.ArkUI.ArkUI.Full
498   * @crossplatform
499   * @atomicservice
500   * @since 11
501   */
502  action: () => void;
503  /**
504   * Define whether the button responds to Enter/Space key by default.
505   *
506   * @type { ?boolean }
507   * @syscap SystemCapability.ArkUI.ArkUI.Full
508   * @crossplatform
509   * @atomicservice
510   * @since 12
511   */
512    primary?: boolean;
513}
514
515/**
516 * Defines TextStyle in the AlertDialog.
517 *
518 * @interface TextStyle
519 * @syscap SystemCapability.ArkUI.ArkUI.Full
520 * @crossplatform
521 * @atomicservice
522 * @since 12
523 */
524declare interface TextStyle {
525  /**
526   * Set the word break type.
527   *
528   * @type { ?WordBreak }
529   * @syscap SystemCapability.ArkUI.ArkUI.Full
530   * @crossplatform
531   * @atomicservice
532   * @since 12
533   */
534  wordBreak?: WordBreak;
535}
536
537/**
538 * Base param used for AlertDialog.show method.
539 *
540 * @interface AlertDialogParam
541 * @syscap SystemCapability.ArkUI.ArkUI.Full
542 * @since 7
543 */
544/**
545 * Base param used for AlertDialog.show method.
546 *
547 * @interface AlertDialogParam
548 * @syscap SystemCapability.ArkUI.ArkUI.Full
549 * @crossplatform
550 * @since 10
551 */
552/**
553 * Base param used for AlertDialog.show method.
554 *
555 * @interface AlertDialogParam
556 * @syscap SystemCapability.ArkUI.ArkUI.Full
557 * @crossplatform
558 * @atomicservice
559 * @since 11
560 */
561declare interface AlertDialogParam {
562  /**
563   * Title Properties
564   *
565   * @type { ?ResourceStr }
566   * @syscap SystemCapability.ArkUI.ArkUI.Full
567   * @since 7
568   */
569  /**
570   * Title Properties
571   *
572   * @type { ?ResourceStr }
573   * @syscap SystemCapability.ArkUI.ArkUI.Full
574   * @crossplatform
575   * @since 10
576   */
577  /**
578   * Title Properties
579   *
580   * @type { ?ResourceStr }
581   * @syscap SystemCapability.ArkUI.ArkUI.Full
582   * @crossplatform
583   * @atomicservice
584   * @since 11
585   */
586  title?: ResourceStr;
587
588  /**
589   * Subtitle Properties
590   * @type { ?ResourceStr }
591   * @syscap SystemCapability.ArkUI.ArkUI.Full
592   * @crossplatform
593   * @since 10
594   */
595  /**
596   * Subtitle Properties
597   * @type { ?ResourceStr }
598   * @syscap SystemCapability.ArkUI.ArkUI.Full
599   * @crossplatform
600   * @atomicservice
601   * @since 11
602   */
603  subtitle?: ResourceStr;
604
605  /**
606   * message Properties
607   *
608   * @type { ResourceStr }
609   * @syscap SystemCapability.ArkUI.ArkUI.Full
610   * @since 7
611   */
612  /**
613   * message Properties
614   *
615   * @type { ResourceStr }
616   * @syscap SystemCapability.ArkUI.ArkUI.Full
617   * @crossplatform
618   * @since 10
619   */
620  /**
621   * message Properties
622   *
623   * @type { ResourceStr }
624   * @syscap SystemCapability.ArkUI.ArkUI.Full
625   * @crossplatform
626   * @atomicservice
627   * @since 11
628   */
629  message: ResourceStr;
630
631  /**
632   * Allows users to click the mask layer to exit.
633   *
634   * @type { ?boolean }
635   * @syscap SystemCapability.ArkUI.ArkUI.Full
636   * @since 7
637   */
638  /**
639   * Allows users to click the mask layer to exit.
640   *
641   * @type { ?boolean }
642   * @syscap SystemCapability.ArkUI.ArkUI.Full
643   * @crossplatform
644   * @since 10
645   */
646  /**
647   * Allows users to click the mask layer to exit.
648   *
649   * @type { ?boolean }
650   * @syscap SystemCapability.ArkUI.ArkUI.Full
651   * @crossplatform
652   * @atomicservice
653   * @since 11
654   */
655  autoCancel?: boolean;
656
657  /**
658   * Execute Cancel Function.
659   *
660   * @type { ?function }
661   * @syscap SystemCapability.ArkUI.ArkUI.Full
662   * @since 7
663   */
664  /**
665   * Execute Cancel Function.
666   *
667   * @type { ?function }
668   * @syscap SystemCapability.ArkUI.ArkUI.Full
669   * @crossplatform
670   * @since 10
671   */
672  /**
673   * Execute Cancel Function.
674   *
675   * @type { ?function }
676   * @syscap SystemCapability.ArkUI.ArkUI.Full
677   * @crossplatform
678   * @atomicservice
679   * @since 11
680   */
681  cancel?: () => void;
682
683  /**
684   * Alignment in the vertical direction.
685   *
686   * @type { ?DialogAlignment }
687   * @syscap SystemCapability.ArkUI.ArkUI.Full
688   * @since 7
689   */
690  /**
691   * Alignment in the vertical direction.
692   *
693   * @type { ?DialogAlignment }
694   * @syscap SystemCapability.ArkUI.ArkUI.Full
695   * @crossplatform
696   * @since 10
697   */
698  /**
699   * Alignment in the vertical direction.
700   *
701   * @type { ?DialogAlignment }
702   * @syscap SystemCapability.ArkUI.ArkUI.Full
703   * @crossplatform
704   * @atomicservice
705   * @since 11
706   */
707  alignment?: DialogAlignment;
708
709  /**
710   * Offset of the pop-up window relative to the alignment position.
711   *
712   * @type { ?Offset }
713   * @syscap SystemCapability.ArkUI.ArkUI.Full
714   * @since 7
715   */
716  /**
717   * Offset of the pop-up window relative to the alignment position.
718   *
719   * @type { ?Offset }
720   * @syscap SystemCapability.ArkUI.ArkUI.Full
721   * @crossplatform
722   * @since 10
723   */
724  /**
725   * Offset of the pop-up window relative to the alignment position.
726   *
727   * @type { ?Offset }
728   * @syscap SystemCapability.ArkUI.ArkUI.Full
729   * @crossplatform
730   * @atomicservice
731   * @since 11
732   */
733  offset?: Offset;
734
735  /**
736   * Grid count of dialog.
737   *
738   * @type { ?number }
739   * @syscap SystemCapability.ArkUI.ArkUI.Full
740   * @since 7
741   */
742  /**
743   * Grid count of dialog.
744   *
745   * @type { ?number }
746   * @syscap SystemCapability.ArkUI.ArkUI.Full
747   * @crossplatform
748   * @since 10
749   */
750  /**
751   * Grid count of dialog.
752   *
753   * @type { ?number }
754   * @syscap SystemCapability.ArkUI.ArkUI.Full
755   * @crossplatform
756   * @atomicservice
757   * @since 11
758   */
759  gridCount?: number;
760
761  /**
762   * Mask Region of dialog. The size cannot exceed the main window.
763   *
764   * @type { ?Rectangle }
765   * @syscap SystemCapability.ArkUI.ArkUI.Full
766   * @crossplatform
767   * @since 10
768   */
769  /**
770   * Mask Region of dialog. The size cannot exceed the main window.
771   *
772   * @type { ?Rectangle }
773   * @syscap SystemCapability.ArkUI.ArkUI.Full
774   * @crossplatform
775   * @atomicservice
776   * @since 11
777   */
778  maskRect?: Rectangle;
779
780  /**
781   * Whether to display in the sub window.
782   *
783   * @type { ?boolean }
784   * @default false
785   * @syscap SystemCapability.ArkUI.ArkUI.Full
786   * @crossplatform
787   * @since 11
788   */
789  /**
790   * Whether to display in the sub window.
791   *
792   * @type { ?boolean }
793   * @default false
794   * @syscap SystemCapability.ArkUI.ArkUI.Full
795   * @crossplatform
796   * @atomicservice
797   * @since 12
798   */
799  showInSubWindow?: boolean;
800
801  /**
802   * Whether it is a modal dialog
803   * @type { ?boolean }
804   * @default true
805   * @syscap SystemCapability.ArkUI.ArkUI.Full
806   * @crossplatform
807   * @since 11
808   */
809  /**
810   * Whether it is a modal dialog
811   * @type { ?boolean }
812   * @default true
813   * @syscap SystemCapability.ArkUI.ArkUI.Full
814   * @crossplatform
815   * @atomicservice
816   * @since 12
817   */
818  isModal?: boolean;
819
820  /**
821   * Defines the alertDialog's background color
822   *
823   * @type { ?ResourceColor }
824   * @default Color.Transparent
825   * @syscap SystemCapability.ArkUI.ArkUI.Full
826   * @crossplatform
827   * @since 11
828   */
829  /**
830   * Defines the alertDialog's background color
831   *
832   * @type { ?ResourceColor }
833   * @default Color.Transparent
834   * @syscap SystemCapability.ArkUI.ArkUI.Full
835   * @crossplatform
836   * @atomicservice
837   * @since 12
838   */
839  backgroundColor?: ResourceColor;
840
841  /**
842   * Defines the alertDialog's background blur Style
843   *
844   * @type { ?BlurStyle }
845   * @default BlurStyle.COMPONENT_ULTRA_THICK
846   * @syscap SystemCapability.ArkUI.ArkUI.Full
847   * @crossplatform
848   * @since 11
849   */
850  /**
851   * Defines the alertDialog's background blur Style
852   *
853   * @type { ?BlurStyle }
854   * @default BlurStyle.COMPONENT_ULTRA_THICK
855   * @syscap SystemCapability.ArkUI.ArkUI.Full
856   * @crossplatform
857   * @atomicservice
858   * @since 12
859   */
860  backgroundBlurStyle?: BlurStyle;
861
862    /**
863   * Callback function when the dialog interactive dismiss
864   *
865   * @type { ?Callback<DismissDialogAction> }
866   * @syscap SystemCapability.ArkUI.ArkUI.Full
867   * @crossplatform
868   * @atomicservice
869   * @since 12
870   */
871  onWillDismiss?: Callback<DismissDialogAction>;
872
873  /**
874   * Transition parameters of opening/closing AlertDialog.
875   *
876   * @type { ?TransitionEffect }
877   * @syscap SystemCapability.ArkUI.ArkUI.Full
878   * @crossplatform
879   * @atomicservice
880   * @since 12
881   */
882  transition?: TransitionEffect;
883
884  /**
885   * Defines the alertDialog's corner radius.
886   *
887   * @type { ?(Dimension | BorderRadiuses | LocalizedBorderRadiuses) }
888   * @syscap SystemCapability.ArkUI.ArkUI.Full
889   * @crossplatform
890   * @atomicservice
891   * @since 12
892   */
893  cornerRadius?: Dimension | BorderRadiuses | LocalizedBorderRadiuses;
894
895  /**
896   * Defines the alertDialog's width.
897   *
898   * @type { ?Dimension }
899   * @syscap SystemCapability.ArkUI.ArkUI.Full
900   * @crossplatform
901   * @atomicservice
902   * @since 12
903   */
904  width?: Dimension;
905
906  /**
907   * Defines the alertDialog's height.
908   *
909   * @type { ?Dimension }
910   * @syscap SystemCapability.ArkUI.ArkUI.Full
911   * @crossplatform
912   * @atomicservice
913   * @since 12
914   */
915  height?: Dimension;
916
917  /**
918   * Defines the alertDialog's border width.
919   *
920   * @type { ?(Dimension | EdgeWidths | LocalizedEdgeWidths) }
921   * @syscap SystemCapability.ArkUI.ArkUI.Full
922   * @crossplatform
923   * @atomicservice
924   * @since 12
925   */
926  borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths;
927
928  /**
929   * Defines the alertDialog's border color.
930   *
931   * @type { ?(ResourceColor | EdgeColors | LocalizedEdgeColors) }
932   * @syscap SystemCapability.ArkUI.ArkUI.Full
933   * @crossplatform
934   * @atomicservice
935   * @since 12
936   */
937  borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors;
938
939  /**
940   * Defines the alertDialog's border style.
941   *
942   * @type { ?(BorderStyle | EdgeStyles) }
943   * @syscap SystemCapability.ArkUI.ArkUI.Full
944   * @crossplatform
945   * @atomicservice
946   * @since 12
947   */
948  borderStyle?: BorderStyle | EdgeStyles;
949
950  /**
951   * Defines the alertDialog's shadow.
952   *
953   * @type { ?(ShadowOptions | ShadowStyle) }
954   * @syscap SystemCapability.ArkUI.ArkUI.Full
955   * @crossplatform
956   * @atomicservice
957   * @since 12
958   */
959  shadow?: ShadowOptions | ShadowStyle;
960
961  /**
962   * Set the alertDialog's textStyle.
963   *
964   * @type { ?TextStyle }
965   * @syscap SystemCapability.ArkUI.ArkUI.Full
966   * @crossplatform
967   * @atomicservice
968   * @since 12
969   */
970  textStyle?: TextStyle;
971}
972
973/**
974 * Defines the AlertDialog with confirm button.
975 *
976 * @interface AlertDialogParamWithConfirm
977 * @syscap SystemCapability.ArkUI.ArkUI.Full
978 * @since 7
979 */
980/**
981 * Defines the AlertDialog with confirm button.
982 *
983 * @interface AlertDialogParamWithConfirm
984 * @syscap SystemCapability.ArkUI.ArkUI.Full
985 * @crossplatform
986 * @since 10
987 */
988/**
989 * Defines the AlertDialog with confirm button.
990 *
991 * @interface AlertDialogParamWithConfirm
992 * @syscap SystemCapability.ArkUI.ArkUI.Full
993 * @crossplatform
994 * @atomicservice
995 * @since 11
996 */
997declare interface AlertDialogParamWithConfirm extends AlertDialogParam {
998  /**
999   * Invoke the commit function.
1000   *
1001   * @type { ?object }
1002   * @syscap SystemCapability.ArkUI.ArkUI.Full
1003   * @since 7
1004   */
1005  /**
1006   * Invoke the commit function.
1007   *
1008   * @type { ?object }
1009   * @syscap SystemCapability.ArkUI.ArkUI.Full
1010   * @crossplatform
1011   * @since 10
1012   */
1013  /**
1014   * Invoke the commit function.
1015   *
1016   * @type { ?object }
1017   * @syscap SystemCapability.ArkUI.ArkUI.Full
1018   * @crossplatform
1019   * @atomicservice
1020   * @since 11
1021   */
1022  confirm?: {
1023    /**
1024     * Enable switch of confirmation button
1025     * @type { ?boolean }
1026     * @default true
1027     * @syscap SystemCapability.ArkUI.ArkUI.Full
1028     * @crossplatform
1029     * @since 10
1030     */
1031    /**
1032     * Enable switch of confirmation button
1033     * @type { ?boolean }
1034     * @default true
1035     * @syscap SystemCapability.ArkUI.ArkUI.Full
1036     * @crossplatform
1037     * @atomicservice
1038     * @since 11
1039     */
1040    enabled?: boolean;
1041
1042    /**
1043     * Default focus switch of confirmation button
1044     * @type { ?boolean }
1045     * @default false
1046     * @syscap SystemCapability.ArkUI.ArkUI.Full
1047     * @crossplatform
1048     * @since 10
1049     */
1050    /**
1051     * Default focus switch of confirmation button
1052     * @type { ?boolean }
1053     * @default false
1054     * @syscap SystemCapability.ArkUI.ArkUI.Full
1055     * @crossplatform
1056     * @atomicservice
1057     * @since 11
1058     */
1059    defaultFocus?: boolean;
1060
1061    /**
1062     * Style of confirmation button.
1063     * @type { ?DialogButtonStyle }
1064     * @default DialogButtonStyle.DEFAULT
1065     * @syscap SystemCapability.ArkUI.ArkUI.Full
1066     * @crossplatform
1067     * @since 10
1068     */
1069    /**
1070     * Style of confirmation button.
1071     * @type { ?DialogButtonStyle }
1072     * @default DialogButtonStyle.DEFAULT
1073     * @syscap SystemCapability.ArkUI.ArkUI.Full
1074     * @crossplatform
1075     * @atomicservice
1076     * @since 11
1077     */
1078    style?: DialogButtonStyle;
1079
1080    /**
1081     * Text content of the confirmation button.
1082     *
1083     * @type { ResourceStr }
1084     * @syscap SystemCapability.ArkUI.ArkUI.Full
1085     * @since 7
1086     */
1087    /**
1088     * Text content of the confirmation button.
1089     *
1090     * @type { ResourceStr }
1091     * @syscap SystemCapability.ArkUI.ArkUI.Full
1092     * @crossplatform
1093     * @since 10
1094     */
1095    /**
1096     * Text content of the confirmation button.
1097     *
1098     * @type { ResourceStr }
1099     * @syscap SystemCapability.ArkUI.ArkUI.Full
1100     * @crossplatform
1101     * @atomicservice
1102     * @since 11
1103     */
1104    value: ResourceStr;
1105
1106    /**
1107     * Text color of the confirmation button.
1108     *
1109     * @type { ?ResourceColor }
1110     * @syscap SystemCapability.ArkUI.ArkUI.Full
1111     * @since 7
1112     */
1113    /**
1114     * Text color of the confirmation button.
1115     *
1116     * @type { ?ResourceColor }
1117     * @syscap SystemCapability.ArkUI.ArkUI.Full
1118     * @crossplatform
1119     * @since 10
1120     */
1121    /**
1122     * Text color of the confirmation button.
1123     *
1124     * @type { ?ResourceColor }
1125     * @syscap SystemCapability.ArkUI.ArkUI.Full
1126     * @crossplatform
1127     * @atomicservice
1128     * @since 11
1129     */
1130    fontColor?: ResourceColor;
1131
1132    /**
1133     * Background color of the confirmation button.
1134     *
1135     * @type { ?ResourceColor }
1136     * @syscap SystemCapability.ArkUI.ArkUI.Full
1137     * @since 7
1138     */
1139    /**
1140     * Background color of the confirmation button.
1141     *
1142     * @type { ?ResourceColor }
1143     * @syscap SystemCapability.ArkUI.ArkUI.Full
1144     * @crossplatform
1145     * @since 10
1146     */
1147    /**
1148     * Background color of the confirmation button.
1149     *
1150     * @type { ?ResourceColor }
1151     * @syscap SystemCapability.ArkUI.ArkUI.Full
1152     * @crossplatform
1153     * @atomicservice
1154     * @since 11
1155     */
1156    backgroundColor?: ResourceColor;
1157
1158    /**
1159     * Method executed by the callback.
1160     *
1161     * @type { function }
1162     * @syscap SystemCapability.ArkUI.ArkUI.Full
1163     * @since 7
1164     */
1165    /**
1166     * Method executed by the callback.
1167     *
1168     * @type { function }
1169     * @syscap SystemCapability.ArkUI.ArkUI.Full
1170     * @crossplatform
1171     * @since 10
1172     */
1173    /**
1174     * Method executed by the callback.
1175     *
1176     * @type { function }
1177     * @syscap SystemCapability.ArkUI.ArkUI.Full
1178     * @crossplatform
1179     * @atomicservice
1180     * @since 11
1181     */
1182    action: () => void;
1183  };
1184}
1185
1186/**
1187 * Component dialog dismiss action.
1188 *
1189 * @interface DismissDialogAction
1190 * @syscap SystemCapability.ArkUI.ArkUI.Full
1191 * @crossplatform
1192 * @atomicservice
1193 * @since 12
1194 */
1195declare interface DismissDialogAction {
1196  /**
1197   * Defines dialog dismiss function.
1198   *
1199   * @type { Callback<void> }
1200   * @syscap SystemCapability.ArkUI.ArkUI.Full
1201   * @crossplatform
1202   * @atomicservice
1203   * @since 12
1204   */
1205  dismiss: Callback<void>;
1206
1207  /**
1208   * Dismiss reason type.
1209   *
1210   * @type { DismissReason }
1211   * @syscap SystemCapability.ArkUI.ArkUI.Full
1212   * @crossplatform
1213   * @atomicservice
1214   * @since 12
1215   */
1216  reason: DismissReason;
1217}
1218
1219/**
1220 * Defines the dialog param with buttons.
1221 *
1222 * @interface AlertDialogParamWithButtons
1223 * @syscap SystemCapability.ArkUI.ArkUI.Full
1224 * @since 7
1225 */
1226/**
1227 * Defines the dialog param with buttons.
1228 *
1229 * @interface AlertDialogParamWithButtons
1230 * @syscap SystemCapability.ArkUI.ArkUI.Full
1231 * @crossplatform
1232 * @since 10
1233 */
1234/**
1235 * Defines the dialog param with buttons.
1236 *
1237 * @interface AlertDialogParamWithButtons
1238 * @syscap SystemCapability.ArkUI.ArkUI.Full
1239 * @crossplatform
1240 * @atomicservice
1241 * @since 11
1242 */
1243declare interface AlertDialogParamWithButtons extends AlertDialogParam {
1244  /**
1245   * First button.
1246   *
1247   * @type { object }
1248   * @syscap SystemCapability.ArkUI.ArkUI.Full
1249   * @since 7
1250   */
1251  /**
1252   * First button.
1253   *
1254   * @type { object }
1255   * @syscap SystemCapability.ArkUI.ArkUI.Full
1256   * @crossplatform
1257   * @since 10
1258   */
1259  /**
1260   * First button.
1261   *
1262   * @type { object }
1263   * @syscap SystemCapability.ArkUI.ArkUI.Full
1264   * @crossplatform
1265   * @atomicservice
1266   * @since 11
1267   */
1268  primaryButton: {
1269    /**
1270     * Enable switch of primaryButton
1271     * @type { ?boolean }
1272     * @default true
1273     * @syscap SystemCapability.ArkUI.ArkUI.Full
1274     * @crossplatform
1275     * @since 10
1276     */
1277    /**
1278     * Enable switch of primaryButton
1279     * @type { ?boolean }
1280     * @default true
1281     * @syscap SystemCapability.ArkUI.ArkUI.Full
1282     * @crossplatform
1283     * @atomicservice
1284     * @since 11
1285     */
1286    enabled?: boolean;
1287
1288    /**
1289     * Default focus switch of primaryButton button
1290     * @type { ?boolean }
1291     * @default false
1292     * @syscap SystemCapability.ArkUI.ArkUI.Full
1293     * @crossplatform
1294     * @since 10
1295     */
1296    /**
1297     * Default focus switch of primaryButton button
1298     * @type { ?boolean }
1299     * @default false
1300     * @syscap SystemCapability.ArkUI.ArkUI.Full
1301     * @crossplatform
1302     * @atomicservice
1303     * @since 11
1304     */
1305    defaultFocus?: boolean;
1306
1307    /**
1308     * Style of primaryButton button.
1309     * @type { ?DialogButtonStyle }
1310     * @default DialogButtonStyle.DEFAULT
1311     * @syscap SystemCapability.ArkUI.ArkUI.Full
1312     * @crossplatform
1313     * @since 10
1314     */
1315    /**
1316     * Style of primaryButton button.
1317     * @type { ?DialogButtonStyle }
1318     * @default DialogButtonStyle.DEFAULT
1319     * @syscap SystemCapability.ArkUI.ArkUI.Full
1320     * @crossplatform
1321     * @atomicservice
1322     * @since 11
1323     */
1324    style?: DialogButtonStyle;
1325
1326    /**
1327     * Text content of the confirmation button.
1328     *
1329     * @type { ResourceStr }
1330     * @syscap SystemCapability.ArkUI.ArkUI.Full
1331     * @since 7
1332     */
1333    /**
1334     * Text content of the confirmation button.
1335     *
1336     * @type { ResourceStr }
1337     * @syscap SystemCapability.ArkUI.ArkUI.Full
1338     * @crossplatform
1339     * @since 10
1340     */
1341    /**
1342     * Text content of the confirmation button.
1343     *
1344     * @type { ResourceStr }
1345     * @syscap SystemCapability.ArkUI.ArkUI.Full
1346     * @crossplatform
1347     * @atomicservice
1348     * @since 11
1349     */
1350    value: ResourceStr;
1351
1352    /**
1353     * Text color of the confirmation button.
1354     *
1355     * @type { ?ResourceColor }
1356     * @syscap SystemCapability.ArkUI.ArkUI.Full
1357     * @since 7
1358     */
1359    /**
1360     * Text color of the confirmation button.
1361     *
1362     * @type { ?ResourceColor }
1363     * @syscap SystemCapability.ArkUI.ArkUI.Full
1364     * @crossplatform
1365     * @since 10
1366     */
1367    /**
1368     * Text color of the confirmation button.
1369     *
1370     * @type { ?ResourceColor }
1371     * @syscap SystemCapability.ArkUI.ArkUI.Full
1372     * @crossplatform
1373     * @atomicservice
1374     * @since 11
1375     */
1376    fontColor?: ResourceColor;
1377
1378    /**
1379     * Background color of the confirmation button.
1380     *
1381     * @type { ?ResourceColor }
1382     * @syscap SystemCapability.ArkUI.ArkUI.Full
1383     * @since 7
1384     */
1385    /**
1386     * Background color of the confirmation button.
1387     *
1388     * @type { ?ResourceColor }
1389     * @syscap SystemCapability.ArkUI.ArkUI.Full
1390     * @crossplatform
1391     * @since 10
1392     */
1393    /**
1394     * Background color of the confirmation button.
1395     *
1396     * @type { ?ResourceColor }
1397     * @syscap SystemCapability.ArkUI.ArkUI.Full
1398     * @crossplatform
1399     * @atomicservice
1400     * @since 11
1401     */
1402    backgroundColor?: ResourceColor;
1403
1404    /**
1405     * Method executed by the callback.
1406     *
1407     * @type { function }
1408     * @syscap SystemCapability.ArkUI.ArkUI.Full
1409     * @since 7
1410     */
1411    /**
1412     * Method executed by the callback.
1413     *
1414     * @type { function }
1415     * @syscap SystemCapability.ArkUI.ArkUI.Full
1416     * @crossplatform
1417     * @since 10
1418     */
1419    /**
1420     * Method executed by the callback.
1421     *
1422     * @type { function }
1423     * @syscap SystemCapability.ArkUI.ArkUI.Full
1424     * @crossplatform
1425     * @atomicservice
1426     * @since 11
1427     */
1428    action: () => void;
1429  };
1430
1431  /**
1432   * Second button.
1433   *
1434   * @type { object }
1435   * @syscap SystemCapability.ArkUI.ArkUI.Full
1436   * @since 7
1437   */
1438  /**
1439   * Second button.
1440   *
1441   * @type { object }
1442   * @syscap SystemCapability.ArkUI.ArkUI.Full
1443   * @crossplatform
1444   * @since 10
1445   */
1446  /**
1447   * Second button.
1448   *
1449   * @type { object }
1450   * @syscap SystemCapability.ArkUI.ArkUI.Full
1451   * @crossplatform
1452   * @atomicservice
1453   * @since 11
1454   */
1455  secondaryButton: {
1456    /**
1457     * Enable switch of secondaryButton
1458     * @type { ?boolean }
1459     * @default true
1460     * @syscap SystemCapability.ArkUI.ArkUI.Full
1461     * @crossplatform
1462     * @since 10
1463     */
1464    /**
1465     * Enable switch of secondaryButton
1466     * @type { ?boolean }
1467     * @default true
1468     * @syscap SystemCapability.ArkUI.ArkUI.Full
1469     * @crossplatform
1470     * @atomicservice
1471     * @since 11
1472     */
1473    enabled?: boolean;
1474
1475    /**
1476     * Default focus switch of secondaryButton button
1477     * @type { ?boolean }
1478     * @default false
1479     * @syscap SystemCapability.ArkUI.ArkUI.Full
1480     * @crossplatform
1481     * @since 10
1482     */
1483    /**
1484     * Default focus switch of secondaryButton button
1485     * @type { ?boolean }
1486     * @default false
1487     * @syscap SystemCapability.ArkUI.ArkUI.Full
1488     * @crossplatform
1489     * @atomicservice
1490     * @since 11
1491     */
1492    defaultFocus?: boolean;
1493
1494    /**
1495     * Style of secondaryButton button.
1496     * @type { ?DialogButtonStyle }
1497     * @default DialogButtonStyle.DEFAULT
1498     * @syscap SystemCapability.ArkUI.ArkUI.Full
1499     * @crossplatform
1500     * @since 10
1501     */
1502    /**
1503     * Style of secondaryButton button.
1504     * @type { ?DialogButtonStyle }
1505     * @default DialogButtonStyle.DEFAULT
1506     * @syscap SystemCapability.ArkUI.ArkUI.Full
1507     * @crossplatform
1508     * @atomicservice
1509     * @since 11
1510     */
1511    style?: DialogButtonStyle;
1512
1513    /**
1514     * Text content of the confirmation button.
1515     *
1516     * @type { ResourceStr }
1517     * @syscap SystemCapability.ArkUI.ArkUI.Full
1518     * @since 7
1519     */
1520    /**
1521     * Text content of the confirmation button.
1522     *
1523     * @type { ResourceStr }
1524     * @syscap SystemCapability.ArkUI.ArkUI.Full
1525     * @crossplatform
1526     * @since 10
1527     */
1528    /**
1529     * Text content of the confirmation button.
1530     *
1531     * @type { ResourceStr }
1532     * @syscap SystemCapability.ArkUI.ArkUI.Full
1533     * @crossplatform
1534     * @atomicservice
1535     * @since 11
1536     */
1537    value: ResourceStr;
1538
1539    /**
1540     * Text color of the confirmation button.
1541     *
1542     * @type { ?ResourceColor }
1543     * @syscap SystemCapability.ArkUI.ArkUI.Full
1544     * @since 7
1545     */
1546    /**
1547     * Text color of the confirmation button.
1548     *
1549     * @type { ?ResourceColor }
1550     * @syscap SystemCapability.ArkUI.ArkUI.Full
1551     * @crossplatform
1552     * @since 10
1553     */
1554    /**
1555     * Text color of the confirmation button.
1556     *
1557     * @type { ?ResourceColor }
1558     * @syscap SystemCapability.ArkUI.ArkUI.Full
1559     * @crossplatform
1560     * @atomicservice
1561     * @since 11
1562     */
1563    fontColor?: ResourceColor;
1564
1565    /**
1566     * Background color of the confirmation button.
1567     *
1568     * @type { ?ResourceColor }
1569     * @syscap SystemCapability.ArkUI.ArkUI.Full
1570     * @since 7
1571     */
1572    /**
1573     * Background color of the confirmation button.
1574     *
1575     * @type { ?ResourceColor }
1576     * @syscap SystemCapability.ArkUI.ArkUI.Full
1577     * @crossplatform
1578     * @since 10
1579     */
1580    /**
1581     * Background color of the confirmation button.
1582     *
1583     * @type { ?ResourceColor }
1584     * @syscap SystemCapability.ArkUI.ArkUI.Full
1585     * @crossplatform
1586     * @atomicservice
1587     * @since 11
1588     */
1589    backgroundColor?: ResourceColor;
1590
1591    /**
1592     * Method executed by the callback.
1593     *
1594     * @type { function }
1595     * @syscap SystemCapability.ArkUI.ArkUI.Full
1596     * @since 7
1597     */
1598    /**
1599     * Method executed by the callback.
1600     *
1601     * @type { function }
1602     * @syscap SystemCapability.ArkUI.ArkUI.Full
1603     * @crossplatform
1604     * @since 10
1605     */
1606    /**
1607     * Method executed by the callback.
1608     *
1609     * @type { function }
1610     * @syscap SystemCapability.ArkUI.ArkUI.Full
1611     * @crossplatform
1612     * @atomicservice
1613     * @since 11
1614     */
1615    action: () => void;
1616  };
1617}
1618
1619/**
1620 * Defines the dialog param with options.
1621 *
1622 * @interface AlertDialogParamWithOptions
1623 * @syscap SystemCapability.ArkUI.ArkUI.Full
1624 * @crossplatform
1625 * @since 10
1626 */
1627/**
1628 * Defines the dialog param with options.
1629 *
1630 * @interface AlertDialogParamWithOptions
1631 * @syscap SystemCapability.ArkUI.ArkUI.Full
1632 * @crossplatform
1633 * @atomicservice
1634 * @since 11
1635 */
1636declare interface AlertDialogParamWithOptions extends AlertDialogParam {
1637  /**
1638   * The array of buttons.
1639   * @type { Array<AlertDialogButtonOptions> }
1640   * @syscap SystemCapability.ArkUI.ArkUI.Full
1641   * @crossplatform
1642   * @since 10
1643   */
1644  /**
1645   * The array of buttons.
1646   * @type { Array<AlertDialogButtonOptions> }
1647   * @syscap SystemCapability.ArkUI.ArkUI.Full
1648   * @crossplatform
1649   * @atomicservice
1650   * @since 11
1651   */
1652  buttons: Array<AlertDialogButtonOptions>;
1653
1654  /**
1655   * The arrangement of buttons.
1656   * @type { ?DialogButtonDirection }
1657   * @default DialogButtonDirection.AUTO
1658   * @syscap SystemCapability.ArkUI.ArkUI.Full
1659   * @crossplatform
1660   * @since 10
1661   */
1662  /**
1663   * The arrangement of buttons.
1664   * @type { ?DialogButtonDirection }
1665   * @default DialogButtonDirection.AUTO
1666   * @syscap SystemCapability.ArkUI.ArkUI.Full
1667   * @crossplatform
1668   * @atomicservice
1669   * @since 11
1670   */
1671  buttonDirection?: DialogButtonDirection;
1672}
1673
1674/**
1675 * Defines AlertDialog which uses show method to show alert dialog.
1676 *
1677 * @syscap SystemCapability.ArkUI.ArkUI.Full
1678 * @since 7
1679 */
1680/**
1681 * Defines AlertDialog which uses show method to show alert dialog.
1682 *
1683 * @syscap SystemCapability.ArkUI.ArkUI.Full
1684 * @crossplatform
1685 * @since 10
1686 */
1687/**
1688 * Defines AlertDialog which uses show method to show alert dialog.
1689 *
1690 * @syscap SystemCapability.ArkUI.ArkUI.Full
1691 * @crossplatform
1692 * @atomicservice
1693 * @since 11
1694 */
1695declare class AlertDialog {
1696  /**
1697   * Invoking method display.
1698   *
1699   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons } value
1700   * @syscap SystemCapability.ArkUI.ArkUI.Full
1701   * @since 7
1702   */
1703  /**
1704   * Invoking method display.
1705   *
1706   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions} value
1707   * @syscap SystemCapability.ArkUI.ArkUI.Full
1708   * @crossplatform
1709   * @since 10
1710   */
1711  /**
1712   * Invoking method display.
1713   *
1714   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions} value
1715   * @syscap SystemCapability.ArkUI.ArkUI.Full
1716   * @crossplatform
1717   * @atomicservice
1718   * @since 11
1719   */
1720  static show(value: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions);
1721}
1722
1723