• 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   * Defines whether to respond to the hover mode.
974   *
975   * @type { ?boolean }
976   * @default false
977   * @syscap SystemCapability.ArkUI.ArkUI.Full
978   * @crossplatform
979   * @atomicservice
980   * @since 14
981   */
982  enableHoverMode?: boolean;
983
984  /**
985   * Defines the alertDialog's display area in hover mode.
986   *
987   * @type { ?HoverModeAreaType }
988   * @default HoverModeAreaType.BOTTOM_SCREEN
989   * @syscap SystemCapability.ArkUI.ArkUI.Full
990   * @crossplatform
991   * @atomicservice
992   * @since 14
993   */
994  hoverModeArea?: HoverModeAreaType;
995}
996
997/**
998 * Defines the AlertDialog with confirm button.
999 *
1000 * @interface AlertDialogParamWithConfirm
1001 * @syscap SystemCapability.ArkUI.ArkUI.Full
1002 * @since 7
1003 */
1004/**
1005 * Defines the AlertDialog with confirm button.
1006 *
1007 * @interface AlertDialogParamWithConfirm
1008 * @syscap SystemCapability.ArkUI.ArkUI.Full
1009 * @crossplatform
1010 * @since 10
1011 */
1012/**
1013 * Defines the AlertDialog with confirm button.
1014 *
1015 * @interface AlertDialogParamWithConfirm
1016 * @syscap SystemCapability.ArkUI.ArkUI.Full
1017 * @crossplatform
1018 * @atomicservice
1019 * @since 11
1020 */
1021declare interface AlertDialogParamWithConfirm extends AlertDialogParam {
1022  /**
1023   * Invoke the commit function.
1024   *
1025   * @type { ?object }
1026   * @syscap SystemCapability.ArkUI.ArkUI.Full
1027   * @since 7
1028   */
1029  /**
1030   * Invoke the commit function.
1031   *
1032   * @type { ?object }
1033   * @syscap SystemCapability.ArkUI.ArkUI.Full
1034   * @crossplatform
1035   * @since 10
1036   */
1037  /**
1038   * Invoke the commit function.
1039   *
1040   * @type { ?object }
1041   * @syscap SystemCapability.ArkUI.ArkUI.Full
1042   * @crossplatform
1043   * @atomicservice
1044   * @since 11
1045   */
1046  confirm?: {
1047    /**
1048     * Enable switch of confirmation button
1049     * @type { ?boolean }
1050     * @default true
1051     * @syscap SystemCapability.ArkUI.ArkUI.Full
1052     * @crossplatform
1053     * @since 10
1054     */
1055    /**
1056     * Enable switch of confirmation button
1057     * @type { ?boolean }
1058     * @default true
1059     * @syscap SystemCapability.ArkUI.ArkUI.Full
1060     * @crossplatform
1061     * @atomicservice
1062     * @since 11
1063     */
1064    enabled?: boolean;
1065
1066    /**
1067     * Default focus switch of confirmation button
1068     * @type { ?boolean }
1069     * @default false
1070     * @syscap SystemCapability.ArkUI.ArkUI.Full
1071     * @crossplatform
1072     * @since 10
1073     */
1074    /**
1075     * Default focus switch of confirmation button
1076     * @type { ?boolean }
1077     * @default false
1078     * @syscap SystemCapability.ArkUI.ArkUI.Full
1079     * @crossplatform
1080     * @atomicservice
1081     * @since 11
1082     */
1083    defaultFocus?: boolean;
1084
1085    /**
1086     * Style of confirmation button.
1087     * @type { ?DialogButtonStyle }
1088     * @default DialogButtonStyle.DEFAULT
1089     * @syscap SystemCapability.ArkUI.ArkUI.Full
1090     * @crossplatform
1091     * @since 10
1092     */
1093    /**
1094     * Style of confirmation button.
1095     * @type { ?DialogButtonStyle }
1096     * @default DialogButtonStyle.DEFAULT
1097     * @syscap SystemCapability.ArkUI.ArkUI.Full
1098     * @crossplatform
1099     * @atomicservice
1100     * @since 11
1101     */
1102    style?: DialogButtonStyle;
1103
1104    /**
1105     * Text content of the confirmation button.
1106     *
1107     * @type { ResourceStr }
1108     * @syscap SystemCapability.ArkUI.ArkUI.Full
1109     * @since 7
1110     */
1111    /**
1112     * Text content of the confirmation button.
1113     *
1114     * @type { ResourceStr }
1115     * @syscap SystemCapability.ArkUI.ArkUI.Full
1116     * @crossplatform
1117     * @since 10
1118     */
1119    /**
1120     * Text content of the confirmation button.
1121     *
1122     * @type { ResourceStr }
1123     * @syscap SystemCapability.ArkUI.ArkUI.Full
1124     * @crossplatform
1125     * @atomicservice
1126     * @since 11
1127     */
1128    value: ResourceStr;
1129
1130    /**
1131     * Text color of the confirmation button.
1132     *
1133     * @type { ?ResourceColor }
1134     * @syscap SystemCapability.ArkUI.ArkUI.Full
1135     * @since 7
1136     */
1137    /**
1138     * Text color of the confirmation button.
1139     *
1140     * @type { ?ResourceColor }
1141     * @syscap SystemCapability.ArkUI.ArkUI.Full
1142     * @crossplatform
1143     * @since 10
1144     */
1145    /**
1146     * Text color of the confirmation button.
1147     *
1148     * @type { ?ResourceColor }
1149     * @syscap SystemCapability.ArkUI.ArkUI.Full
1150     * @crossplatform
1151     * @atomicservice
1152     * @since 11
1153     */
1154    fontColor?: ResourceColor;
1155
1156    /**
1157     * Background color of the confirmation button.
1158     *
1159     * @type { ?ResourceColor }
1160     * @syscap SystemCapability.ArkUI.ArkUI.Full
1161     * @since 7
1162     */
1163    /**
1164     * Background color of the confirmation button.
1165     *
1166     * @type { ?ResourceColor }
1167     * @syscap SystemCapability.ArkUI.ArkUI.Full
1168     * @crossplatform
1169     * @since 10
1170     */
1171    /**
1172     * Background color of the confirmation button.
1173     *
1174     * @type { ?ResourceColor }
1175     * @syscap SystemCapability.ArkUI.ArkUI.Full
1176     * @crossplatform
1177     * @atomicservice
1178     * @since 11
1179     */
1180    backgroundColor?: ResourceColor;
1181
1182    /**
1183     * Method executed by the callback.
1184     *
1185     * @type { function }
1186     * @syscap SystemCapability.ArkUI.ArkUI.Full
1187     * @since 7
1188     */
1189    /**
1190     * Method executed by the callback.
1191     *
1192     * @type { function }
1193     * @syscap SystemCapability.ArkUI.ArkUI.Full
1194     * @crossplatform
1195     * @since 10
1196     */
1197    /**
1198     * Method executed by the callback.
1199     *
1200     * @type { function }
1201     * @syscap SystemCapability.ArkUI.ArkUI.Full
1202     * @crossplatform
1203     * @atomicservice
1204     * @since 11
1205     */
1206    action: () => void;
1207  };
1208}
1209
1210/**
1211 * Component dialog dismiss action.
1212 *
1213 * @interface DismissDialogAction
1214 * @syscap SystemCapability.ArkUI.ArkUI.Full
1215 * @crossplatform
1216 * @atomicservice
1217 * @since 12
1218 */
1219declare interface DismissDialogAction {
1220  /**
1221   * Defines dialog dismiss function.
1222   *
1223   * @type { Callback<void> }
1224   * @syscap SystemCapability.ArkUI.ArkUI.Full
1225   * @crossplatform
1226   * @atomicservice
1227   * @since 12
1228   */
1229  dismiss: Callback<void>;
1230
1231  /**
1232   * Dismiss reason type.
1233   *
1234   * @type { DismissReason }
1235   * @syscap SystemCapability.ArkUI.ArkUI.Full
1236   * @crossplatform
1237   * @atomicservice
1238   * @since 12
1239   */
1240  reason: DismissReason;
1241}
1242
1243/**
1244 * Defines the dialog param with buttons.
1245 *
1246 * @interface AlertDialogParamWithButtons
1247 * @syscap SystemCapability.ArkUI.ArkUI.Full
1248 * @since 7
1249 */
1250/**
1251 * Defines the dialog param with buttons.
1252 *
1253 * @interface AlertDialogParamWithButtons
1254 * @syscap SystemCapability.ArkUI.ArkUI.Full
1255 * @crossplatform
1256 * @since 10
1257 */
1258/**
1259 * Defines the dialog param with buttons.
1260 *
1261 * @interface AlertDialogParamWithButtons
1262 * @syscap SystemCapability.ArkUI.ArkUI.Full
1263 * @crossplatform
1264 * @atomicservice
1265 * @since 11
1266 */
1267declare interface AlertDialogParamWithButtons extends AlertDialogParam {
1268  /**
1269   * First button.
1270   *
1271   * @type { object }
1272   * @syscap SystemCapability.ArkUI.ArkUI.Full
1273   * @since 7
1274   */
1275  /**
1276   * First button.
1277   *
1278   * @type { object }
1279   * @syscap SystemCapability.ArkUI.ArkUI.Full
1280   * @crossplatform
1281   * @since 10
1282   */
1283  /**
1284   * First button.
1285   *
1286   * @type { object }
1287   * @syscap SystemCapability.ArkUI.ArkUI.Full
1288   * @crossplatform
1289   * @atomicservice
1290   * @since 11
1291   */
1292  primaryButton: {
1293    /**
1294     * Enable switch of primaryButton
1295     * @type { ?boolean }
1296     * @default true
1297     * @syscap SystemCapability.ArkUI.ArkUI.Full
1298     * @crossplatform
1299     * @since 10
1300     */
1301    /**
1302     * Enable switch of primaryButton
1303     * @type { ?boolean }
1304     * @default true
1305     * @syscap SystemCapability.ArkUI.ArkUI.Full
1306     * @crossplatform
1307     * @atomicservice
1308     * @since 11
1309     */
1310    enabled?: boolean;
1311
1312    /**
1313     * Default focus switch of primaryButton button
1314     * @type { ?boolean }
1315     * @default false
1316     * @syscap SystemCapability.ArkUI.ArkUI.Full
1317     * @crossplatform
1318     * @since 10
1319     */
1320    /**
1321     * Default focus switch of primaryButton button
1322     * @type { ?boolean }
1323     * @default false
1324     * @syscap SystemCapability.ArkUI.ArkUI.Full
1325     * @crossplatform
1326     * @atomicservice
1327     * @since 11
1328     */
1329    defaultFocus?: boolean;
1330
1331    /**
1332     * Style of primaryButton button.
1333     * @type { ?DialogButtonStyle }
1334     * @default DialogButtonStyle.DEFAULT
1335     * @syscap SystemCapability.ArkUI.ArkUI.Full
1336     * @crossplatform
1337     * @since 10
1338     */
1339    /**
1340     * Style of primaryButton button.
1341     * @type { ?DialogButtonStyle }
1342     * @default DialogButtonStyle.DEFAULT
1343     * @syscap SystemCapability.ArkUI.ArkUI.Full
1344     * @crossplatform
1345     * @atomicservice
1346     * @since 11
1347     */
1348    style?: DialogButtonStyle;
1349
1350    /**
1351     * Text content of the confirmation button.
1352     *
1353     * @type { ResourceStr }
1354     * @syscap SystemCapability.ArkUI.ArkUI.Full
1355     * @since 7
1356     */
1357    /**
1358     * Text content of the confirmation button.
1359     *
1360     * @type { ResourceStr }
1361     * @syscap SystemCapability.ArkUI.ArkUI.Full
1362     * @crossplatform
1363     * @since 10
1364     */
1365    /**
1366     * Text content of the confirmation button.
1367     *
1368     * @type { ResourceStr }
1369     * @syscap SystemCapability.ArkUI.ArkUI.Full
1370     * @crossplatform
1371     * @atomicservice
1372     * @since 11
1373     */
1374    value: ResourceStr;
1375
1376    /**
1377     * Text color of the confirmation button.
1378     *
1379     * @type { ?ResourceColor }
1380     * @syscap SystemCapability.ArkUI.ArkUI.Full
1381     * @since 7
1382     */
1383    /**
1384     * Text color of the confirmation button.
1385     *
1386     * @type { ?ResourceColor }
1387     * @syscap SystemCapability.ArkUI.ArkUI.Full
1388     * @crossplatform
1389     * @since 10
1390     */
1391    /**
1392     * Text color of the confirmation button.
1393     *
1394     * @type { ?ResourceColor }
1395     * @syscap SystemCapability.ArkUI.ArkUI.Full
1396     * @crossplatform
1397     * @atomicservice
1398     * @since 11
1399     */
1400    fontColor?: ResourceColor;
1401
1402    /**
1403     * Background color of the confirmation button.
1404     *
1405     * @type { ?ResourceColor }
1406     * @syscap SystemCapability.ArkUI.ArkUI.Full
1407     * @since 7
1408     */
1409    /**
1410     * Background color of the confirmation button.
1411     *
1412     * @type { ?ResourceColor }
1413     * @syscap SystemCapability.ArkUI.ArkUI.Full
1414     * @crossplatform
1415     * @since 10
1416     */
1417    /**
1418     * Background color of the confirmation button.
1419     *
1420     * @type { ?ResourceColor }
1421     * @syscap SystemCapability.ArkUI.ArkUI.Full
1422     * @crossplatform
1423     * @atomicservice
1424     * @since 11
1425     */
1426    backgroundColor?: ResourceColor;
1427
1428    /**
1429     * Method executed by the callback.
1430     *
1431     * @type { function }
1432     * @syscap SystemCapability.ArkUI.ArkUI.Full
1433     * @since 7
1434     */
1435    /**
1436     * Method executed by the callback.
1437     *
1438     * @type { function }
1439     * @syscap SystemCapability.ArkUI.ArkUI.Full
1440     * @crossplatform
1441     * @since 10
1442     */
1443    /**
1444     * Method executed by the callback.
1445     *
1446     * @type { function }
1447     * @syscap SystemCapability.ArkUI.ArkUI.Full
1448     * @crossplatform
1449     * @atomicservice
1450     * @since 11
1451     */
1452    action: () => void;
1453  };
1454
1455  /**
1456   * Second button.
1457   *
1458   * @type { object }
1459   * @syscap SystemCapability.ArkUI.ArkUI.Full
1460   * @since 7
1461   */
1462  /**
1463   * Second button.
1464   *
1465   * @type { object }
1466   * @syscap SystemCapability.ArkUI.ArkUI.Full
1467   * @crossplatform
1468   * @since 10
1469   */
1470  /**
1471   * Second button.
1472   *
1473   * @type { object }
1474   * @syscap SystemCapability.ArkUI.ArkUI.Full
1475   * @crossplatform
1476   * @atomicservice
1477   * @since 11
1478   */
1479  secondaryButton: {
1480    /**
1481     * Enable switch of secondaryButton
1482     * @type { ?boolean }
1483     * @default true
1484     * @syscap SystemCapability.ArkUI.ArkUI.Full
1485     * @crossplatform
1486     * @since 10
1487     */
1488    /**
1489     * Enable switch of secondaryButton
1490     * @type { ?boolean }
1491     * @default true
1492     * @syscap SystemCapability.ArkUI.ArkUI.Full
1493     * @crossplatform
1494     * @atomicservice
1495     * @since 11
1496     */
1497    enabled?: boolean;
1498
1499    /**
1500     * Default focus switch of secondaryButton button
1501     * @type { ?boolean }
1502     * @default false
1503     * @syscap SystemCapability.ArkUI.ArkUI.Full
1504     * @crossplatform
1505     * @since 10
1506     */
1507    /**
1508     * Default focus switch of secondaryButton button
1509     * @type { ?boolean }
1510     * @default false
1511     * @syscap SystemCapability.ArkUI.ArkUI.Full
1512     * @crossplatform
1513     * @atomicservice
1514     * @since 11
1515     */
1516    defaultFocus?: boolean;
1517
1518    /**
1519     * Style of secondaryButton button.
1520     * @type { ?DialogButtonStyle }
1521     * @default DialogButtonStyle.DEFAULT
1522     * @syscap SystemCapability.ArkUI.ArkUI.Full
1523     * @crossplatform
1524     * @since 10
1525     */
1526    /**
1527     * Style of secondaryButton button.
1528     * @type { ?DialogButtonStyle }
1529     * @default DialogButtonStyle.DEFAULT
1530     * @syscap SystemCapability.ArkUI.ArkUI.Full
1531     * @crossplatform
1532     * @atomicservice
1533     * @since 11
1534     */
1535    style?: DialogButtonStyle;
1536
1537    /**
1538     * Text content of the confirmation button.
1539     *
1540     * @type { ResourceStr }
1541     * @syscap SystemCapability.ArkUI.ArkUI.Full
1542     * @since 7
1543     */
1544    /**
1545     * Text content of the confirmation button.
1546     *
1547     * @type { ResourceStr }
1548     * @syscap SystemCapability.ArkUI.ArkUI.Full
1549     * @crossplatform
1550     * @since 10
1551     */
1552    /**
1553     * Text content of the confirmation button.
1554     *
1555     * @type { ResourceStr }
1556     * @syscap SystemCapability.ArkUI.ArkUI.Full
1557     * @crossplatform
1558     * @atomicservice
1559     * @since 11
1560     */
1561    value: ResourceStr;
1562
1563    /**
1564     * Text color of the confirmation button.
1565     *
1566     * @type { ?ResourceColor }
1567     * @syscap SystemCapability.ArkUI.ArkUI.Full
1568     * @since 7
1569     */
1570    /**
1571     * Text color of the confirmation button.
1572     *
1573     * @type { ?ResourceColor }
1574     * @syscap SystemCapability.ArkUI.ArkUI.Full
1575     * @crossplatform
1576     * @since 10
1577     */
1578    /**
1579     * Text color of the confirmation button.
1580     *
1581     * @type { ?ResourceColor }
1582     * @syscap SystemCapability.ArkUI.ArkUI.Full
1583     * @crossplatform
1584     * @atomicservice
1585     * @since 11
1586     */
1587    fontColor?: ResourceColor;
1588
1589    /**
1590     * Background color of the confirmation button.
1591     *
1592     * @type { ?ResourceColor }
1593     * @syscap SystemCapability.ArkUI.ArkUI.Full
1594     * @since 7
1595     */
1596    /**
1597     * Background color of the confirmation button.
1598     *
1599     * @type { ?ResourceColor }
1600     * @syscap SystemCapability.ArkUI.ArkUI.Full
1601     * @crossplatform
1602     * @since 10
1603     */
1604    /**
1605     * Background color of the confirmation button.
1606     *
1607     * @type { ?ResourceColor }
1608     * @syscap SystemCapability.ArkUI.ArkUI.Full
1609     * @crossplatform
1610     * @atomicservice
1611     * @since 11
1612     */
1613    backgroundColor?: ResourceColor;
1614
1615    /**
1616     * Method executed by the callback.
1617     *
1618     * @type { function }
1619     * @syscap SystemCapability.ArkUI.ArkUI.Full
1620     * @since 7
1621     */
1622    /**
1623     * Method executed by the callback.
1624     *
1625     * @type { function }
1626     * @syscap SystemCapability.ArkUI.ArkUI.Full
1627     * @crossplatform
1628     * @since 10
1629     */
1630    /**
1631     * Method executed by the callback.
1632     *
1633     * @type { function }
1634     * @syscap SystemCapability.ArkUI.ArkUI.Full
1635     * @crossplatform
1636     * @atomicservice
1637     * @since 11
1638     */
1639    action: () => void;
1640  };
1641}
1642
1643/**
1644 * Defines the dialog param with options.
1645 *
1646 * @interface AlertDialogParamWithOptions
1647 * @syscap SystemCapability.ArkUI.ArkUI.Full
1648 * @crossplatform
1649 * @since 10
1650 */
1651/**
1652 * Defines the dialog param with options.
1653 *
1654 * @interface AlertDialogParamWithOptions
1655 * @syscap SystemCapability.ArkUI.ArkUI.Full
1656 * @crossplatform
1657 * @atomicservice
1658 * @since 11
1659 */
1660declare interface AlertDialogParamWithOptions extends AlertDialogParam {
1661  /**
1662   * The array of buttons.
1663   * @type { Array<AlertDialogButtonOptions> }
1664   * @syscap SystemCapability.ArkUI.ArkUI.Full
1665   * @crossplatform
1666   * @since 10
1667   */
1668  /**
1669   * The array of buttons.
1670   * @type { Array<AlertDialogButtonOptions> }
1671   * @syscap SystemCapability.ArkUI.ArkUI.Full
1672   * @crossplatform
1673   * @atomicservice
1674   * @since 11
1675   */
1676  buttons: Array<AlertDialogButtonOptions>;
1677
1678  /**
1679   * The arrangement of buttons.
1680   * @type { ?DialogButtonDirection }
1681   * @default DialogButtonDirection.AUTO
1682   * @syscap SystemCapability.ArkUI.ArkUI.Full
1683   * @crossplatform
1684   * @since 10
1685   */
1686  /**
1687   * The arrangement of buttons.
1688   * @type { ?DialogButtonDirection }
1689   * @default DialogButtonDirection.AUTO
1690   * @syscap SystemCapability.ArkUI.ArkUI.Full
1691   * @crossplatform
1692   * @atomicservice
1693   * @since 11
1694   */
1695  buttonDirection?: DialogButtonDirection;
1696}
1697
1698/**
1699 * Defines AlertDialog which uses show method to show alert dialog.
1700 *
1701 * @syscap SystemCapability.ArkUI.ArkUI.Full
1702 * @since 7
1703 */
1704/**
1705 * Defines AlertDialog which uses show method to show alert dialog.
1706 *
1707 * @syscap SystemCapability.ArkUI.ArkUI.Full
1708 * @crossplatform
1709 * @since 10
1710 */
1711/**
1712 * Defines AlertDialog which uses show method to show alert dialog.
1713 *
1714 * @syscap SystemCapability.ArkUI.ArkUI.Full
1715 * @crossplatform
1716 * @atomicservice
1717 * @since 11
1718 */
1719declare class AlertDialog {
1720  /**
1721   * Invoking method display.
1722   *
1723   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons } value
1724   * @syscap SystemCapability.ArkUI.ArkUI.Full
1725   * @since 7
1726   */
1727  /**
1728   * Invoking method display.
1729   *
1730   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions} value
1731   * @syscap SystemCapability.ArkUI.ArkUI.Full
1732   * @crossplatform
1733   * @since 10
1734   */
1735  /**
1736   * Invoking method display.
1737   *
1738   * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions} value
1739   * @syscap SystemCapability.ArkUI.ArkUI.Full
1740   * @crossplatform
1741   * @atomicservice
1742   * @since 11
1743   */
1744  static show(value: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions);
1745}
1746
1747