• 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/*** if arkts 1.2 */
22import { Resource, ResourceColor, Offset, Dimension, ResourceStr } from './units';
23import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, Callback, Bindable } from './common';
24import { DialogAlignment } from './alertDialog';
25import { CrownSensitivity, TextOverflow } from './enums';
26import { LengthMetrics } from './../Graphics';
27/*** endif */
28
29/**
30 * Define the contents of each selector item.
31 *
32 * @interface TextPickerRangeContent
33 * @syscap SystemCapability.ArkUI.ArkUI.Full
34 * @crossplatform
35 * @since 10
36 */
37/**
38 * Define the contents of each selector item.
39 *
40 * @interface TextPickerRangeContent
41 * @syscap SystemCapability.ArkUI.ArkUI.Full
42 * @crossplatform
43 * @atomicservice
44 * @since arkts {'1.1':'11','1.2':'20'}
45 * @arkts 1.1&1.2
46 */
47declare interface TextPickerRangeContent {
48  /**
49   * Image resource.
50   * If the value is a string, such as **"/common/hello.png"**, it represents the path to the image.
51   *
52   * @type { string | Resource }
53   * @syscap SystemCapability.ArkUI.ArkUI.Full
54   * @crossplatform
55   * @since 10
56   */
57  /**
58   * Image resource.
59   * If the value is a string, such as **"/common/hello.png"**, it represents the path to the image.
60   *
61   * @type { string | Resource }
62   * @syscap SystemCapability.ArkUI.ArkUI.Full
63   * @crossplatform
64   * @atomicservice
65   * @since arkts {'1.1':'11','1.2':'20'}
66   * @arkts 1.1&1.2
67   */
68  icon: string | Resource;
69
70  /**
71   * Text information.
72   *
73   * <p><strong>NOTE</strong>:
74   * <br>If the text length exceeds the column width, the text will be truncated.
75   * </p>
76   *
77   * @type { ?(string | Resource) }
78   * @default ""
79   * @syscap SystemCapability.ArkUI.ArkUI.Full
80   * @crossplatform
81   * @since 10
82   */
83  /**
84   * Text information.
85   *
86   * <p><strong>NOTE</strong>:
87   * <br>If the text length exceeds the column width, the text will be truncated.
88   * </p>
89   *
90   * @type { ?(string | Resource) }
91   * @default ""
92   * @syscap SystemCapability.ArkUI.ArkUI.Full
93   * @crossplatform
94   * @atomicservice
95   * @since arkts {'1.1':'11','1.2':'20'}
96   * @arkts 1.1&1.2
97   */
98  text?: string | Resource;
99}
100
101/**
102 * Define the contents of text cascade picker.
103 *
104 * @interface TextCascadePickerRangeContent
105 * @syscap SystemCapability.ArkUI.ArkUI.Full
106 * @since 10
107 */
108/**
109 * Define the contents of text cascade picker.
110 *
111 * @interface TextCascadePickerRangeContent
112 * @syscap SystemCapability.ArkUI.ArkUI.Full
113 * @crossplatform
114 * @atomicservice
115 * @since arkts {'1.1':'11','1.2':'20'}
116 * @arkts 1.1&1.2
117 */
118declare interface TextCascadePickerRangeContent {
119  /**
120   * Text information.
121   *
122   * <p><strong>NOTE</strong>:
123   * If the text length exceeds the column width, the text will be truncated.
124   * </p>
125   *
126   * @type { string | Resource }
127   * @syscap SystemCapability.ArkUI.ArkUI.Full
128   * @since 10
129   */
130  /**
131   * Text information.
132   *
133   * <p><strong>NOTE</strong>:
134   * If the text length exceeds the column width, the text will be truncated.
135   * </p>
136   *
137   * @type { string | Resource }
138   * @syscap SystemCapability.ArkUI.ArkUI.Full
139   * @crossplatform
140   * @atomicservice
141   * @since arkts {'1.1':'11','1.2':'20'}
142   * @arkts 1.1&1.2
143   */
144  text: string | Resource;
145
146  /**
147   * Linkage data.
148   *
149   * @type { ?TextCascadePickerRangeContent[] }
150   * @syscap SystemCapability.ArkUI.ArkUI.Full
151   * @since 10
152   */
153  /**
154   * Linkage data.
155   *
156   * @type { ?TextCascadePickerRangeContent[] }
157   * @syscap SystemCapability.ArkUI.ArkUI.Full
158   * @crossplatform
159   * @atomicservice
160   * @since arkts {'1.1':'11','1.2':'20'}
161   * @arkts 1.1&1.2
162   */
163  children?: TextCascadePickerRangeContent[];
164}
165
166/**
167 * Defines the options of TextPicker.
168 *
169 * @interface TextPickerOptions
170 * @syscap SystemCapability.ArkUI.ArkUI.Full
171 * @since 8
172 */
173/**
174 * Defines the options of TextPicker.
175 *
176 * @interface TextPickerOptions
177 * @syscap SystemCapability.ArkUI.ArkUI.Full
178 * @crossplatform
179 * @since 10
180 */
181/**
182 * Defines the options of TextPicker.
183 *
184 * @interface TextPickerOptions
185 * @syscap SystemCapability.ArkUI.ArkUI.Full
186 * @crossplatform
187 * @atomicservice
188 * @since arkts {'1.1':'11','1.2':'20'}
189 * @arkts 1.1&1.2
190 */
191declare interface TextPickerOptions {
192  /**
193   * Data selection range of the picker.
194   *
195   * @type {string[] | Resource}
196   * @syscap SystemCapability.ArkUI.ArkUI.Full
197   * @since 8
198   */
199  /**
200   * Data selection range of the picker.
201   * Support the display of pictures, text and pictures plus text, or multi column plain text.
202   *
203   * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]}
204   * @syscap SystemCapability.ArkUI.ArkUI.Full
205   * @crossplatform
206   * @since 10
207   */
208  /**
209   * Data selection range of the picker.
210   * Support the display of pictures, text and pictures plus text, or multi column plain text.
211   *
212   * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]}
213   * @syscap SystemCapability.ArkUI.ArkUI.Full
214   * @crossplatform
215   * @atomicservice
216   * @since arkts {'1.1':'11','1.2':'20'}
217   * @arkts 1.1&1.2
218   */
219  range: string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[];
220
221  /**
222   * Value of the default item in the range.
223   * The priority of this parameter is lower than that of selected.
224   *
225   * <p><strong>NOTE</strong>:
226   * This parameter works only when the picker contains text only.
227   * </p>
228   *
229   * @type { ?string }
230   * @default value of the first item
231   * @syscap SystemCapability.ArkUI.ArkUI.Full
232   * @since 8
233   */
234  /**
235   * Value of the default item in the range.
236   * The priority of this parameter is lower than that of selected.
237   * For a single-column picker, use a value of the string type.
238   * For a multi-column (linked) picker, use a value of the string[] type.
239   *
240   * <p><strong>NOTE</strong>:
241   * <br>This parameter works only when the picker contains text only.
242   * </p>
243   *
244   * @type { ?(string | string[]) }
245   * @syscap SystemCapability.ArkUI.ArkUI.Full
246   * @crossplatform
247   * @since 10
248   */
249  /**
250   * Value of the default item in the range.
251   * The priority of this parameter is lower than that of selected.
252   * For a single-column picker, use a value of the string type.
253   * For a multi-column (linked) picker, use a value of the string[] type.
254   *
255   * <p><strong>NOTE</strong>:
256   * This parameter works only when the picker contains text only.
257   * </p>
258   *
259   * @type { ?(string | string[]) }
260   * @default value of the first item
261   * @syscap SystemCapability.ArkUI.ArkUI.Full
262   * @crossplatform
263   * @atomicservice
264   * @since 11
265   */
266  /**
267   * Value of the current selection.
268   * Only valid when only text is displayed.
269   *
270   * @type { ?(ResourceStr | ResourceStr[]) }
271   * @syscap SystemCapability.ArkUI.ArkUI.Full
272   * @crossplatform
273   * @atomicservice
274   * @since 20
275   */
276  value?: ResourceStr | ResourceStr[];
277
278  /**
279   * Value of the current selection.
280   * Only valid when only text is displayed.
281   *
282   * @type { ?(ResourceStr | ResourceStr[] | Bindable<ResourceStr> | Bindable<ResourceStr[]>) }
283   * @syscap SystemCapability.ArkUI.ArkUI.Full
284   * @crossplatform
285   * @atomicservice
286   * @since 20
287   * @arkts 1.2
288   */
289  value?: ResourceStr | ResourceStr[] | Bindable<ResourceStr> | Bindable<ResourceStr[]>;
290
291  /**
292   * Index of the default selected item in the array.
293   * The index is zero-based.
294   *
295   * @type { ?number }
296   * @default 0
297   * @syscap SystemCapability.ArkUI.ArkUI.Full
298   * @since 8
299   */
300  /**
301   * Index of the default selected item in the array.
302   * The index is zero-based.
303   * For a single-column picker, use a value of the number type.
304   * For a multi-column (linked) picker, use a value of the number[].
305   *
306   * @type { ?(number | number[]) }
307   * @default 0
308   * @syscap SystemCapability.ArkUI.ArkUI.Full
309   * @crossplatform
310   * @since 10
311   */
312  /**
313   * Index of the default selected item in the array.
314   * The index is zero-based.
315   * For a single-column picker, use a value of the number type.
316   * For a multi-column (linked) picker, use a value of the number[].
317   *
318   * @type { ?(number | number[]) }
319   * @default 0
320   * @syscap SystemCapability.ArkUI.ArkUI.Full
321   * @crossplatform
322   * @atomicservice
323   * @since 11
324   */
325  selected?: number | number[];
326
327  /**
328   * Current selected subscript.
329   *
330   * @type { ?(number | number[] | Bindable<number> | Bindable<number[]>) }
331   * @syscap SystemCapability.ArkUI.ArkUI.Full
332   * @crossplatform
333   * @atomicservice
334   * @since 20
335   * @arkts 1.2
336   */
337  selected?: number | number[] | Bindable<number> | Bindable<number[]>;
338
339  /**
340   * Width of each column in the picker.
341   *
342   * <p><strong>NOTE</strong>:
343   * <br>If the text length exceeds the column width, the text will be truncated.
344   * </p>
345   *
346   * @type { ?LengthMetrics[] }
347   * @syscap SystemCapability.ArkUI.ArkUI.Full
348   * @crossplatform
349   * @atomicservice
350   * @since arkts {'1.1':'18','1.2':'20'}
351   * @arkts 1.1&1.2
352   */
353  columnWidths?: LengthMetrics[];
354}
355
356/**
357 * TextPickerInterface
358 *
359 * @interface TextPickerInterface
360 * @syscap SystemCapability.ArkUI.ArkUI.Full
361 * @since 8
362 */
363/**
364 * TextPickerInterface
365 *
366 * @interface TextPickerInterface
367 * @syscap SystemCapability.ArkUI.ArkUI.Full
368 * @crossplatform
369 * @since 10
370 */
371/**
372 * TextPickerInterface
373 *
374 * @interface TextPickerInterface
375 * @syscap SystemCapability.ArkUI.ArkUI.Full
376 * @crossplatform
377 * @atomicservice
378 * @since arkts {'1.1':'11','1.2':'20'}
379 * @arkts 1.1&1.2
380 */
381interface TextPickerInterface {
382  /**
383   * Defines the TextPicker constructor.
384   *
385   * @param { TextPickerOptions } options
386   * @returns { TextPickerAttribute }
387   * @syscap SystemCapability.ArkUI.ArkUI.Full
388   * @since 8
389   */
390  /**
391   * Defines the TextPicker constructor.
392   *
393   * @param { TextPickerOptions } options
394   * @returns { TextPickerAttribute }
395   * @syscap SystemCapability.ArkUI.ArkUI.Full
396   * @crossplatform
397   * @since 10
398   */
399  /**
400   * Defines the TextPicker constructor.
401   *
402   * @param { TextPickerOptions } options
403   * @returns { TextPickerAttribute }
404   * @syscap SystemCapability.ArkUI.ArkUI.Full
405   * @crossplatform
406   * @atomicservice
407   * @since arkts {'1.1':'11','1.2':'20'}
408   * @arkts 1.1&1.2
409   */
410  (options?: TextPickerOptions): TextPickerAttribute;
411}
412
413/**
414 * Defines the struct of DividerOptions.
415 *
416 * @interface DividerOptions
417 * @syscap SystemCapability.ArkUI.ArkUI.Full
418 * @crossplatform
419 * @atomicservice
420 * @since arkts {'1.1':'12','1.2':'20'}
421 * @arkts 1.1&1.2
422 */
423declare interface DividerOptions {
424  /**
425   * Stroke width of the divider.
426   * The unit is vp by default. You can also specify it as px. The percentage type is not supported.
427   *
428   * <p><strong>NOTE</strong>:
429   * <br>If the value is less than 0, the default value is used.
430   * <br>The maximum value allowed is half the height of the column.
431   * </p>
432   *
433   * @type { ?Dimension }
434   * @default 2.0px
435   * @syscap SystemCapability.ArkUI.ArkUI.Full
436   * @crossplatform
437   * @atomicservice
438   * @since arkts {'1.1':'12','1.2':'20'}
439   * @arkts 1.1&1.2
440   */
441  strokeWidth?: Dimension;
442
443  /**
444   * Color of the divider.
445   *
446   * @type { ?ResourceColor }
447   * @default '#33000000'
448   * @syscap SystemCapability.ArkUI.ArkUI.Full
449   * @crossplatform
450   * @atomicservice
451   * @since arkts {'1.1':'12','1.2':'20'}
452   * @arkts 1.1&1.2
453   */
454  color?: ResourceColor;
455
456  /**
457   * Distance between the divider and the start edge of the picker.
458   * The unit is vp by default. You can also specify it as px. The percentage type is not supported.
459   *
460   * <p><strong>NOTE</strong>:
461   * Values less than 0 are invalid. The maximum value allowed is the width of the column.
462   * </p>
463   *
464   * @type { ?Dimension }
465   * @default 0
466   * @syscap SystemCapability.ArkUI.ArkUI.Full
467   * @crossplatform
468   * @atomicservice
469   * @since arkts {'1.1':'12','1.2':'20'}
470   * @arkts 1.1&1.2
471   */
472  startMargin?: Dimension;
473
474  /**
475   * Distance between the divider and the end edge of the picker.
476   * The unit is vp by default. You can also specify it as px. The percentage type is not supported.
477   *
478   * <p><strong>NOTE</strong>:
479   * <br>Values less than 0 are invalid. The maximum value allowed is the width of the column.
480   * </p>
481   *
482   * @type { ?Dimension }
483   * @default 0
484   * @syscap SystemCapability.ArkUI.ArkUI.Full
485   * @crossplatform
486   * @atomicservice
487   * @since arkts {'1.1':'12','1.2':'20'}
488   * @arkts 1.1&1.2
489   */
490  endMargin?: Dimension;
491}
492
493/**
494 * Defines the text style options.
495 *
496 * @extends PickerTextStyle
497 * @interface TextPickerTextStyle
498 * @syscap SystemCapability.ArkUI.ArkUI.Full
499 * @crossplatform
500 * @atomicservice
501 * @since arkts {'1.1':'15','1.2':'20'}
502 * @arkts 1.1&1.2
503 */
504declare interface TextPickerTextStyle extends PickerTextStyle {
505  /**
506   * Minimum font size, used in conjunction with maxFontSize.
507   * When minFontSize and maxFontSize are set,
508   * the size setting in font is ineffective.
509   * The default maximum number of lines is 1,
510   * and the default height adaptation mode is MIN_FONT_SIZE_FIRST.
511   *
512   * @type { ?(number | string | Resource) }
513   * @syscap SystemCapability.ArkUI.ArkUI.Full
514   * @crossplatform
515   * @atomicservice
516   * @since arkts {'1.1':'15','1.2':'20'}
517   * @arkts 1.1&1.2
518   */
519  minFontSize?: number | string | Resource;
520
521  /**
522   * Maximum font size.
523   *
524   * @type { ?(number | string | Resource) }
525   * @syscap SystemCapability.ArkUI.ArkUI.Full
526   * @crossplatform
527   * @atomicservice
528   * @since arkts {'1.1':'15','1.2':'20'}
529   * @arkts 1.1&1.2
530   */
531  maxFontSize?: number | string | Resource;
532
533  /**
534   * Display mode when the text is too long.
535   *
536   * <p><strong>NOTE</strong>:
537   * Ineffective when set to MARQUEE.
538   * </p>
539   *
540   * @type { ?TextOverflow }
541   * @syscap SystemCapability.ArkUI.ArkUI.Full
542   * @crossplatform
543   * @atomicservice
544   * @since arkts {'1.1':'15','1.2':'20'}
545   * @arkts 1.1&1.2
546   */
547  overflow?: TextOverflow;
548}
549
550/**
551 * Provide an interface to set the background style of selected items.
552 *
553 * @interface PickerBackgroundStyle
554 * @syscap SystemCapability.ArkUI.ArkUI.Full
555 * @crossplatform
556 * @atomicservice
557 * @since 20
558 */
559declare interface PickerBackgroundStyle {
560  /**
561   * Define the background color of selected item.
562   *
563   * @type { ?ResourceColor }
564   * @syscap SystemCapability.ArkUI.ArkUI.Full
565   * @crossplatform
566   * @atomicservice
567   * @since 20
568   */
569  color?: ResourceColor;
570
571  /**
572   * Defines the border radius of selected items.
573   *
574   * @type { ?(LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses) }
575   * @syscap SystemCapability.ArkUI.ArkUI.Full
576   * @crossplatform
577   * @atomicservice
578   * @since 20
579   */
580  borderRadius?: LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses;
581}
582
583/**
584 * Callback of the listened scroll stop event.
585 *
586 * @typedef {function} TextPickerScrollStopCallback
587 * @param { string | string[] } value - Value of the selected item.
588 * @param { number | number[] } index - Index of the selected item.
589 * @syscap SystemCapability.ArkUI.ArkUI.Full
590 * @crossplatform
591 * @atomicservice
592 * @since arkts {'1.1':'14','1.2':'20'}
593 * @arkts 1.1&1.2
594 */
595declare type TextPickerScrollStopCallback = (value: string | string[], index: number | number[]) => void;
596
597/**
598 * Callback of TextPicker item is selected event.
599 *
600 * @typedef {function} OnTextPickerChangeCallback
601 * @param { string | string[] } selectItem - Value of the selected item.
602 * @param { number | number[] } index - Index of the selected item.
603 * @syscap SystemCapability.ArkUI.ArkUI.Full
604 * @crossplatform
605 * @atomicservice
606 * @since arkts {'1.1':'18','1.2':'20'}
607 * @arkts 1.1&1.2
608 */
609declare type OnTextPickerChangeCallback = (selectItem: string | string[], index: number | number[]) => void;
610
611/**
612 * Callback of the listened onEnterSelectedArea event.
613 *
614 * @typedef {function} TextPickerEnterSelectedAreaCallback
615 * @param { string | string[] } value - Value of the selected item.
616 * @param { number | number[] } index - Index of the selected item.
617 * @syscap SystemCapability.ArkUI.ArkUI.Full
618 * @crossplatform
619 * @atomicservice
620 * @since arkts {'1.1':'18','1.2':'20'}
621 * @arkts 1.1&1.2
622 */
623declare type TextPickerEnterSelectedAreaCallback = (value: string | string[], index: number | number[]) => void;
624
625/**
626 * Style the text selector.
627 *
628 * @extends CommonMethod<TextPickerAttribute>
629 * @syscap SystemCapability.ArkUI.ArkUI.Full
630 * @since 8
631 */
632/**
633 * Style the text selector.
634 *
635 * @extends CommonMethod<TextPickerAttribute>
636 * @syscap SystemCapability.ArkUI.ArkUI.Full
637 * @crossplatform
638 * @since 10
639 */
640/**
641 * Style the text selector.
642 *
643 * @extends CommonMethod<TextPickerAttribute>
644 * @syscap SystemCapability.ArkUI.ArkUI.Full
645 * @crossplatform
646 * @atomicservice
647 * @since arkts {'1.1':'11','1.2':'20'}
648 * @arkts 1.1&1.2
649 */
650declare class TextPickerAttribute extends CommonMethod<TextPickerAttribute> {
651  /**
652   * Sets the height of each item in the picker.
653   *
654   * @param { number | string } value
655   * @returns { TextPickerAttribute }
656   * @syscap SystemCapability.ArkUI.ArkUI.Full
657   * @since 8
658   */
659  /**
660   * Sets the height of each item in the picker.
661   *
662   * @param { number | string } value
663   * @returns { TextPickerAttribute }
664   * @syscap SystemCapability.ArkUI.ArkUI.Full
665   * @crossplatform
666   * @since 10
667   */
668  /**
669   * Sets the height of each item in the picker.
670   *
671   * @param { number | string } value - Height of each item in the picker.
672   * <br>For the number type, the value range is [0, +∞).
673   * <br>For the string type, only numeric string values, for example, "56", are supported.
674   * @returns { TextPickerAttribute }
675   * @default 56 vp (selected) and 36 vp (unselected).
676   * @syscap SystemCapability.ArkUI.ArkUI.Full
677   * @crossplatform
678   * @atomicservice
679   * @since arkts {'1.1':'11','1.2':'20'}
680   * @arkts 1.1&1.2
681   */
682  defaultPickerItemHeight(value: number | string): TextPickerAttribute;
683
684  /**
685   * Sets the height of each item in the picker.
686   *
687   * @param { Optional<number | string> } height - Height of each item in the picker.
688   * <br>For the number type, the value range is [0, +∞).
689   * <br>For the string type, only numeric string values, for example, "56", are supported.
690   * @default 56 vp (selected) and 36 vp (unselected).
691   * @returns { TextPickerAttribute }
692   * @syscap SystemCapability.ArkUI.ArkUI.Full
693   * @crossplatform
694   * @atomicservice
695   * @since arkts {'1.1':'18','1.2':'20'}
696   * @arkts 1.1&1.2
697   */
698  defaultPickerItemHeight(height: Optional<number | string>): TextPickerAttribute;
699
700  /**
701   * Sets whether scrolling is loopable.
702   *
703   * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable.
704   * @default true
705   * @returns { TextPickerAttribute }
706   * @syscap SystemCapability.ArkUI.ArkUI.Full
707   * @since 10
708   */
709  /**
710   * Sets whether scrolling is loopable.
711   *
712   * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable.
713   * @default true
714   * @returns { TextPickerAttribute }
715   * @syscap SystemCapability.ArkUI.ArkUI.Full
716   * @crossplatform
717   * @atomicservice
718   * @since arkts {'1.1':'11','1.2':'20'}
719   * @arkts 1.1&1.2
720   */
721  canLoop(value: boolean): TextPickerAttribute;
722
723  /**
724   * Can scroll loop if true is set, on the contrary it can not.
725   * this API supports the undefined type for the isLoop parameter.
726   *
727   * @param { Optional<boolean> } isLoop - Whether scrolling is loopable. true: loopable; false: not loopable.
728   * @default true
729   * @returns { TextPickerAttribute }
730   * @syscap SystemCapability.ArkUI.ArkUI.Full
731   * @crossplatform
732   * @atomicservice
733   * @since arkts {'1.1':'18','1.2':'20'}
734   * @arkts 1.1&1.2
735   */
736  canLoop(isLoop: Optional<boolean>): TextPickerAttribute;
737
738  /**
739   * Sets the font color, font size, and font weight for the top and bottom items.
740   *
741   * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items.
742   * @returns { TextPickerAttribute }
743   * @syscap SystemCapability.ArkUI.ArkUI.Full
744   * @crossplatform
745   * @since 10
746   */
747  /**
748   * Sets the font color, font size, and font weight for the top and bottom items.
749   *
750   * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items.
751   * @returns { TextPickerAttribute }
752   * @syscap SystemCapability.ArkUI.ArkUI.Full
753   * @crossplatform
754   * @atomicservice
755   * @since arkts {'1.1':'11','1.2':'20'}
756   * @arkts 1.1&1.2
757   */
758  disappearTextStyle(value: PickerTextStyle): TextPickerAttribute;
759
760  /**
761   * Sets the font color, font size, and font weight for the top and bottom items.
762   * This API supports the undefined type for the style parameter.
763   *
764   * @param { Optional<PickerTextStyle> } style - Font color, font size, and font weight of the top and bottom items.
765   * @returns { TextPickerAttribute }
766   * @syscap SystemCapability.ArkUI.ArkUI.Full
767   * @crossplatform
768   * @atomicservice
769   * @since arkts {'1.1':'18','1.2':'20'}
770   * @arkts 1.1&1.2
771   */
772  disappearTextStyle(style: Optional<PickerTextStyle>): TextPickerAttribute;
773
774  /**
775   * Sets the text style of disappearing items
776   *
777   * @param { Optional<PickerTextStyle | TextPickerTextStyle> } style - indicates the text style of disappearing items.
778   * @returns { TextPickerAttribute }
779   * @syscap SystemCapability.ArkUI.ArkUI.Full
780   * @crossplatform
781   * @atomicservice
782   * @since 20
783   */
784  disappearTextStyle(style: Optional<PickerTextStyle | TextPickerTextStyle>): TextPickerAttribute;
785
786  /**
787   * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items.
788   *
789   * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top,
790   * <br>bottom, and selected items.
791   * @returns { TextPickerAttribute }
792   * @syscap SystemCapability.ArkUI.ArkUI.Full
793   * @crossplatform
794   * @since 10
795   */
796  /**
797   * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items.
798   *
799   * @param { PickerTextStyle } value - indicates the text style of normal items.
800   * @returns { TextPickerAttribute }
801   * @syscap SystemCapability.ArkUI.ArkUI.Full
802   * @crossplatform
803   * @atomicservice
804   * @since arkts {'1.1':'11','1.2':'20'}
805   * @arkts 1.1&1.2
806   */
807  textStyle(value: PickerTextStyle): TextPickerAttribute;
808
809  /**
810   * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items.
811   * This API supports the undefined type for the style parameter.
812   *
813   * @param { Optional<PickerTextStyle> } style - Font color, font size, and font weight of all
814   * <br>items except the top, bottom, and selected items.
815   * @returns { TextPickerAttribute }
816   * @syscap SystemCapability.ArkUI.ArkUI.Full
817   * @crossplatform
818   * @atomicservice
819   * @since arkts {'1.1':'18','1.2':'20'}
820   * @arkts 1.1&1.2
821   */
822  textStyle(style: Optional<PickerTextStyle>): TextPickerAttribute;
823
824  /**
825   * Sets the text style of normal items
826   *
827   * @param { Optional<PickerTextStyle | TextPickerTextStyle> } style - indicates the text style of normal items.
828   * @returns { TextPickerAttribute }
829   * @syscap SystemCapability.ArkUI.ArkUI.Full
830   * @crossplatform
831   * @atomicservice
832   * @since 20
833   */
834  textStyle(style: Optional<PickerTextStyle | TextPickerTextStyle>): TextPickerAttribute;
835
836  /**
837   * Sets the font color, font size, and font weight for the selected item.
838   *
839   * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item..
840   * @returns { TextPickerAttribute }
841   * @syscap SystemCapability.ArkUI.ArkUI.Full
842   * @crossplatform
843   * @since 10
844   */
845  /**
846   * Sets the font color, font size, and font weight for the selected item.
847   *
848   * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item.
849   * @returns { TextPickerAttribute }
850   * @syscap SystemCapability.ArkUI.ArkUI.Full
851   * @crossplatform
852   * @atomicservice
853   * @since arkts {'1.1':'11','1.2':'20'}
854   * @arkts 1.1&1.2
855   */
856  selectedTextStyle(value: PickerTextStyle): TextPickerAttribute;
857
858  /**
859   * Sets the font color, font size, and font weight for the selected item.
860   * This API supports the undefined type for the style parameter.
861   *
862   * @param { Optional<PickerTextStyle> } style - Font color, font size, and font weight of the selected item.
863   * @returns { TextPickerAttribute }
864   * @syscap SystemCapability.ArkUI.ArkUI.Full
865   * @crossplatform
866   * @atomicservice
867   * @since arkts {'1.1':'18','1.2':'20'}
868   * @arkts 1.1&1.2
869   */
870  selectedTextStyle(style: Optional<PickerTextStyle>): TextPickerAttribute;
871
872  /**
873   * Sets the text style of selected items
874   *
875   * @param { Optional<PickerTextStyle | TextPickerTextStyle> } style - indicates the text style of selected items.
876   * @returns { TextPickerAttribute }
877   * @syscap SystemCapability.ArkUI.ArkUI.Full
878   * @crossplatform
879   * @atomicservice
880   * @since 20
881   */
882  selectedTextStyle(style: Optional<PickerTextStyle | TextPickerTextStyle>): TextPickerAttribute;
883
884  /**
885   * Sets whether to enable the text style change animation during the scrolling process.
886   *
887   * @param { boolean } disabled
888   * @default false
889   * @returns { TextPickerAttribute }
890   * @syscap SystemCapability.ArkUI.ArkUI.Full
891   * @crossplatform
892   * @atomicservice
893   * @since arkts {'1.1':'15','1.2':'20'}
894   * @arkts 1.1&1.2
895   */
896  disableTextStyleAnimation(disabled: boolean): TextPickerAttribute;
897
898  /**
899   * Sets the style of the text items when the text style change animation during the scrolling process is disabled.
900   *
901   * @param { TextPickerTextStyle } style
902   * @returns { TextPickerAttribute }
903   * @syscap SystemCapability.ArkUI.ArkUI.Full
904   * @crossplatform
905   * @atomicservice
906   * @since arkts {'1.1':'15','1.2':'20'}
907   * @arkts 1.1&1.2
908   */
909  defaultTextStyle(style: TextPickerTextStyle): TextPickerAttribute;
910
911  /**
912   * Triggered when the OK button in the dialog box is clicked.
913   *
914   * @param { function } callback
915   * @returns { TextPickerAttribute }
916   * @syscap SystemCapability.ArkUI.ArkUI.Full
917   * @since 8
918   * @deprecated since 10
919   */
920  onAccept(callback: (value: string, index: number) => void): TextPickerAttribute;
921
922  /**
923   * Triggered when the Cancel button in the dialog box is clicked.
924   *
925   * @param { function } callback
926   * @returns { TextPickerAttribute }
927   * @syscap SystemCapability.ArkUI.ArkUI.Full
928   * @since 8
929   * @deprecated since 10
930   */
931  onCancel(callback: () => void): TextPickerAttribute;
932
933  /**
934   * Triggered when an item in the picker is selected.
935   *
936   * @param { function } callback - the callback of onChange.
937   * @returns { TextPickerAttribute }
938   * @syscap SystemCapability.ArkUI.ArkUI.Full
939   * @since 8
940   */
941  /**
942   * Triggered when an item in the picker is selected.
943   * When the picker contains text only or both text and imagery,
944   * value indicates the text of the selected item.
945   * When the picker contains imagery only, value is empty.
946   *
947   * @param { function } callback - the callback of onChange.
948   * @returns { TextPickerAttribute }
949   * @syscap SystemCapability.ArkUI.ArkUI.Full
950   * @crossplatform
951   * @since 10
952   */
953  /**
954   * Triggered when an item in the picker is selected.
955   * When the picker contains text only or both text and imagery,
956   * value indicates the text of the selected item.
957   * When the picker contains imagery only, value is empty.
958   *
959   * @param { function } callback - the callback of onChange.
960   * @returns { TextPickerAttribute }
961   * @syscap SystemCapability.ArkUI.ArkUI.Full
962   * @crossplatform
963   * @atomicservice
964   * @since 11
965   */
966  onChange(callback: (value: string | string[], index: number | number[]) => void): TextPickerAttribute;
967
968  /**
969   * Triggered when the text picker snaps to the selected item.
970   * Compared to onChange, this API supports the undefined type for the callback parameter.
971   *
972   * @param { Optional<OnTextPickerChangeCallback> } callback - the callback of onChange.
973   * @returns { TextPickerAttribute }
974   * @syscap SystemCapability.ArkUI.ArkUI.Full
975   * @crossplatform
976   * @atomicservice
977   * @since arkts {'1.1':'18','1.2':'20'}
978   * @arkts 1.1&1.2
979   */
980  onChange(callback: Optional<OnTextPickerChangeCallback>): TextPickerAttribute;
981
982  /**
983   * Triggered when the scrolling in the text picker stops.
984   * If the scrolling is initiated by a gesture,
985   * this event is triggered when the finger is lifted from the screen and the scrolling stops.
986   *
987   * @param { TextPickerScrollStopCallback } callback - Triggered when the scrolling
988   * <br>in the text picker stops.
989   * @returns { TextPickerAttribute }
990   * @syscap SystemCapability.ArkUI.ArkUI.Full
991   * @crossplatform
992   * @atomicservice
993   * @since arkts {'1.1':'14','1.2':'20'}
994   * @arkts 1.1&1.2
995   */
996  onScrollStop(callback: TextPickerScrollStopCallback): TextPickerAttribute;
997
998  /**
999   * Triggered when the scrolling in the text picker stops.
1000   * If the scrolling is initiated by a gesture,
1001   * this event is triggered when the finger is lifted from the screen and the scrolling stops.
1002   *
1003   * @param { Optional<TextPickerScrollStopCallback> } callback - Triggered when the scrolling
1004   * <br>in the text picker stops.
1005   * @returns { TextPickerAttribute }
1006   * @syscap SystemCapability.ArkUI.ArkUI.Full
1007   * @crossplatform
1008   * @atomicservice
1009   * @since arkts {'1.1':'18','1.2':'20'}
1010   * @arkts 1.1&1.2
1011   */
1012  onScrollStop(callback: Optional<TextPickerScrollStopCallback>): TextPickerAttribute;
1013
1014  /**
1015   * Triggered during the scrolling of the text picker when an item enters the divider area.
1016   * When the picker contains text only or a combination of images and text,
1017   * value indicates the text of the selected item. When the picker contains images only, value is empty.
1018   *
1019   * @param { TextPickerEnterSelectedAreaCallback } callback - Triggered during the scrolling of
1020   * <br>the text picker when an item enters the divider area.
1021   * @returns { TextPickerAttribute }
1022   * @syscap SystemCapability.ArkUI.ArkUI.Full
1023   * @crossplatform
1024   * @atomicservice
1025   * @since arkts {'1.1':'18','1.2':'20'}
1026   * @arkts 1.1&1.2
1027   */
1028  onEnterSelectedArea(callback: TextPickerEnterSelectedAreaCallback): TextPickerAttribute;
1029
1030  /**
1031   * Sets the index of the default selected item in the array.
1032   * Its priority is higher than that of the selected value in options.
1033   * For a single-column picker, use a value of the number type.
1034   * For a multi-column (linked) picker, use a value of the number[] type.
1035   *
1036   * @param { number | number[] } value - Index of the default selected item in the array.
1037   * @default 0
1038   * @returns { TextPickerAttribute }
1039   * @syscap SystemCapability.ArkUI.ArkUI.Full
1040   * @crossplatform
1041   * @since 10
1042   */
1043  /**
1044   * Sets the index of the default selected item in the array.
1045   * Its priority is higher than that of the selected value in options.
1046   * For a single-column picker, use a value of the number type.
1047   * For a multi-column (linked) picker, use a value of the number[] type.
1048   *
1049   * @param { number | number[] } value - Index of the default selected item in the array.
1050   * @default 0
1051   * @returns { TextPickerAttribute }
1052   * @syscap SystemCapability.ArkUI.ArkUI.Full
1053   * @crossplatform
1054   * @atomicservice
1055   * @since arkts {'1.1':'11','1.2':'20'}
1056   * @arkts 1.1&1.2
1057   */
1058  selectedIndex(value: number | number[]): TextPickerAttribute;
1059
1060  /**
1061   * Sets the index of the default selected item in the array.
1062   * Its priority is higher than that of the selected value in options.
1063   * For a single-column picker, use a value of the number type. For a multi-column (linked) picker,
1064   * use a value of the number[] type. Compared to [selectedIndex](#selectedindex10),
1065   * this API supports the undefined type for the index parameter.
1066   *
1067   * @param { Optional<number | number[]> } index - Index of the default selected item in the array.
1068   * <br>The index is zero-based.<br>If index is set to undefined, the default value 0 is used.
1069   * @default 0
1070   * @returns { TextPickerAttribute }
1071   * @syscap SystemCapability.ArkUI.ArkUI.Full
1072   * @crossplatform
1073   * @atomicservice
1074   * @since arkts {'1.1':'18','1.2':'20'}
1075   * @arkts 1.1&1.2
1076   */
1077  selectedIndex(index: Optional<number | number[]>): TextPickerAttribute;
1078
1079  /**
1080   * Sets the divider style.
1081   *
1082   * @param { DividerOptions | null } value
1083   * @returns { TextPickerAttribute }
1084   * @syscap SystemCapability.ArkUI.ArkUI.Full
1085   * @crossplatform
1086   * @atomicservice
1087   * @since arkts {'1.1':'12','1.2':'20'}
1088   * @arkts 1.1&1.2
1089   */
1090  divider(value: DividerOptions | null): TextPickerAttribute;
1091
1092  /**
1093   * Sets the divider style.
1094   *
1095   * @param { Optional<DividerOptions | null> } textDivider
1096   * @returns { TextPickerAttribute }
1097   * @syscap SystemCapability.ArkUI.ArkUI.Full
1098   * @crossplatform
1099   * @atomicservice
1100   * @since arkts {'1.1':'18','1.2':'20'}
1101   * @arkts 1.1&1.2
1102   */
1103  divider(textDivider: Optional<DividerOptions | null>): TextPickerAttribute;
1104
1105  /**
1106   * Sets the height for the fade effect.
1107   * If this attribute is not set, the default fade effect is displayed.
1108   *
1109   * <p><strong>NOTE</strong>:
1110   * <br>Avoid changing the attribute data during the animation process of this component.
1111   * </p>
1112   *
1113   * @param { Dimension } value - Height of the fade effect at the top and bottom edges of the content area.
1114   * @default 36vp
1115   * @returns { TextPickerAttribute }
1116   * @syscap SystemCapability.ArkUI.ArkUI.Full
1117   * @crossplatform
1118   * @atomicservice
1119   * @since arkts {'1.1':'12','1.2':'20'}
1120   * @arkts 1.1&1.2
1121   */
1122  gradientHeight(value: Dimension): TextPickerAttribute;
1123
1124  /**
1125   * Specifies whether to enable haptic feedback.
1126   *
1127   * @param { Optional<boolean> } enable - Whether to enable haptic feedback.
1128   * @default true
1129   * @returns { TextPickerAttribute }
1130   * @syscap SystemCapability.ArkUI.ArkUI.Full
1131   * @atomicservice
1132   * @since arkts {'1.1':'18','1.2':'20'}
1133   * @arkts 1.1&1.2
1134   */
1135  enableHapticFeedback(enable: Optional<boolean>): TextPickerAttribute;
1136
1137  /**
1138   * Sets the height for the fade effect.
1139   * If this attribute is not set, the default fade effect is displayed.
1140   * this API supports the undefinedtype for the height parameter.
1141   *
1142   * <p><strong>NOTE</strong>:
1143   * <br>Avoid changing the attribute data during the animation process of this component.
1144   * </p>
1145   *
1146   * @param { Optional<Dimension> } height - THeight of the fade effect at the top and bottom edges of
1147   * <br>the content area.
1148   * @default 36vp
1149   * @returns { TextPickerAttribute }
1150   * @syscap SystemCapability.ArkUI.ArkUI.Full
1151   * @crossplatform
1152   * @atomicservice
1153   * @since arkts {'1.1':'18','1.2':'20'}
1154   * @arkts 1.1&1.2
1155   */
1156  gradientHeight(height: Optional<Dimension>): TextPickerAttribute;
1157
1158  /**
1159   * Sets the sensitivity to the digital crown rotation.
1160   *
1161   * @param { Optional<CrownSensitivity> } sensitivity - Sensitivity to the digital crown rotation.
1162   * @default CrownSensitivity.MEDIUM
1163   * @returns { TextPickerAttribute }
1164   * @syscap SystemCapability.ArkUI.ArkUI.Full
1165   * @crossplatform
1166   * @atomicservice
1167   * @since arkts {'1.1':'18','1.2':'20'}
1168   * @arkts 1.1&1.2
1169   */
1170  digitalCrownSensitivity(sensitivity: Optional<CrownSensitivity>): TextPickerAttribute;
1171
1172  /**
1173   * Sets the background style of selected items.
1174   *
1175   * @param { Optional<PickerBackgroundStyle> } style - the background style of selected items.
1176   * @returns { TextPickerAttribute }
1177   * @syscap SystemCapability.ArkUI.ArkUI.Full
1178   * @crossplatform
1179   * @atomicservice
1180   * @since 20
1181   */
1182  selectedBackgroundStyle(style: Optional<PickerBackgroundStyle>): TextPickerAttribute;
1183}
1184
1185/**
1186 * Defines the struct of TextPickerResult.
1187 *
1188 * @interface TextPickerResult
1189 * @syscap SystemCapability.ArkUI.ArkUI.Full
1190 * @since 8
1191 */
1192/**
1193 * Defines the struct of TextPickerResult.
1194 *
1195 * @interface TextPickerResult
1196 * @syscap SystemCapability.ArkUI.ArkUI.Full
1197 * @crossplatform
1198 * @since 10
1199 */
1200/**
1201 * Defines the struct of TextPickerResult.
1202 *
1203 * @interface TextPickerResult
1204 * @syscap SystemCapability.ArkUI.ArkUI.Full
1205 * @crossplatform
1206 * @atomicservice
1207 * @since arkts {'1.1':'11','1.2':'20'}
1208 * @arkts 1.1&1.2
1209 */
1210declare interface TextPickerResult {
1211  /**
1212   * The currently selected value.
1213   *
1214   * @type { string }
1215   * @syscap SystemCapability.ArkUI.ArkUI.Full
1216   * @since 8
1217   */
1218  /**
1219   * The currently selected value.
1220   * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "".
1221   *
1222   * @type { string | string[] }
1223   * @syscap SystemCapability.ArkUI.ArkUI.Full
1224   * @crossplatform
1225   * @since 10
1226   */
1227  /**
1228   * The currently selected value.
1229   * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "".
1230   *
1231   * @type { string | string[] }
1232   * @syscap SystemCapability.ArkUI.ArkUI.Full
1233   * @crossplatform
1234   * @atomicservice
1235   * @since arkts {'1.1':'11','1.2':'20'}
1236   * @arkts 1.1&1.2
1237   */
1238  value: string | string[];
1239
1240  /**
1241   * The subscript of the current selection.
1242   *
1243   * @type { number }
1244   * @syscap SystemCapability.ArkUI.ArkUI.Full
1245   * @since 8
1246   */
1247  /**
1248   * The subscript of the current selection.
1249   *
1250   * @type { number | number[] }
1251   * @syscap SystemCapability.ArkUI.ArkUI.Full
1252   * @crossplatform
1253   * @since 10
1254   */
1255  /**
1256   * The subscript of the current selection.
1257   *
1258   * @type { number | number[] }
1259   * @syscap SystemCapability.ArkUI.ArkUI.Full
1260   * @crossplatform
1261   * @atomicservice
1262   * @since arkts {'1.1':'11','1.2':'20'}
1263   * @arkts 1.1&1.2
1264   */
1265  index: number | number[];
1266}
1267
1268/**
1269 * Defines the TextPickerDialogOptions for Text Picker Dialog.
1270 *
1271 * @extends TextPickerOptions
1272 * @interface TextPickerDialogOptions
1273 * @syscap SystemCapability.ArkUI.ArkUI.Full
1274 * @since 8
1275 */
1276/**
1277 * Defines the TextPickerDialogOptions for Text Picker Dialog.
1278 *
1279 * @extends TextPickerOptions
1280 * @interface TextPickerDialogOptions
1281 * @syscap SystemCapability.ArkUI.ArkUI.Full
1282 * @crossplatform
1283 * @since 10
1284 */
1285/**
1286 * Defines the TextPickerDialogOptions for Text Picker Dialog.
1287 *
1288 * @extends TextPickerOptions
1289 * @interface TextPickerDialogOptions
1290 * @syscap SystemCapability.ArkUI.ArkUI.Full
1291 * @crossplatform
1292 * @atomicservice
1293 * @since arkts {'1.1':'11','1.2':'20'}
1294 * @arkts 1.1&1.2
1295 */
1296declare interface TextPickerDialogOptions extends TextPickerOptions {
1297  /**
1298   * Called when the default height of the selected element is set.
1299   *
1300   * @type { ?(number | string) }
1301   * @syscap SystemCapability.ArkUI.ArkUI.Full
1302   * @since 8
1303   */
1304  /**
1305   * Called when the default height of the selected element is set.
1306   *
1307   * @type { ?(number | string) }
1308   * @syscap SystemCapability.ArkUI.ArkUI.Full
1309   * @crossplatform
1310   * @since 10
1311   */
1312  /**
1313   * Height of the picker item.
1314   *
1315   * @type { ?(number | string) }
1316   * @default 56 vp (selected) and 36 vp (unselected)
1317   * @syscap SystemCapability.ArkUI.ArkUI.Full
1318   * @crossplatform
1319   * @atomicservice
1320   * @since arkts {'1.1':'11','1.2':'20'}
1321   * @arkts 1.1&1.2
1322   */
1323  defaultPickerItemHeight?: number | string;
1324
1325  /**
1326   * Can scroll loop if true is set, on the contrary it can not.
1327   *
1328   * @type { ?boolean }
1329   * @default true
1330   * @syscap SystemCapability.ArkUI.ArkUI.Full
1331   * @since 10
1332   */
1333  /**
1334   * Whether to support scroll looping.
1335   * The value true means to support scroll looping, and false means the opposite.
1336   *
1337   * @type { ?boolean }
1338   * @default true
1339   * @syscap SystemCapability.ArkUI.ArkUI.Full
1340   * @crossplatform
1341   * @atomicservice
1342   * @since arkts {'1.1':'11','1.2':'20'}
1343   * @arkts 1.1&1.2
1344   */
1345  canLoop?: boolean;
1346
1347  /**
1348   * Text style of disappearing items
1349   *
1350   * @type { ?PickerTextStyle }
1351   * @syscap SystemCapability.ArkUI.ArkUI.Full
1352   * @crossplatform
1353   * @since 10
1354   */
1355  /**
1356   * Font color, font size, and font weight of the top and bottom items.
1357   *
1358   * @type { ?PickerTextStyle }
1359   * @syscap SystemCapability.ArkUI.ArkUI.Full
1360   * @crossplatform
1361   * @atomicservice
1362   * @since arkts {'1.1':'11','1.2':'20'}
1363   * @arkts 1.1&1.2
1364   */
1365  disappearTextStyle?: PickerTextStyle;
1366
1367  /**
1368   * Text style of normal items
1369   *
1370   * @type { ?PickerTextStyle }
1371   * @syscap SystemCapability.ArkUI.ArkUI.Full
1372   * @crossplatform
1373   * @since 10
1374   */
1375  /**
1376   * Font color, font size, and font weight of all items except the top, bottom, and selected items.
1377   *
1378   * @type { ?PickerTextStyle }
1379   * @syscap SystemCapability.ArkUI.ArkUI.Full
1380   * @crossplatform
1381   * @atomicservice
1382   * @since arkts {'1.1':'11','1.2':'20'}
1383   * @arkts 1.1&1.2
1384   */
1385  textStyle?: PickerTextStyle;
1386
1387  /**
1388   * Style of accept button.
1389   *
1390   * <p><strong>NOTE</strong>:
1391   * <br>In the acceptButtonStyle and cancelButtonStyle configurations,
1392   * <br>only one primary field can be set to true at most.
1393   * <br>If both the primary fields are set to true, neither will take effect.
1394   * </p>
1395   *
1396   * @type { ?PickerDialogButtonStyle }
1397   * @syscap SystemCapability.ArkUI.ArkUI.Full
1398   * @crossplatform
1399   * @atomicservice
1400   * @since arkts {'1.1':'12','1.2':'20'}
1401   * @arkts 1.1&1.2
1402   */
1403  acceptButtonStyle?: PickerDialogButtonStyle;
1404
1405  /**
1406   * Style of cancel button.
1407   *
1408   * <p><strong>NOTE</strong>:
1409   * <br>In the acceptButtonStyle and cancelButtonStyle configurations,
1410   * <br>only one primary field can be set to true at most.
1411   * <br>If both the primary fields are set to true, neither will take effect.
1412   * </p>
1413   *
1414   * @type { ?PickerDialogButtonStyle }
1415   * @syscap SystemCapability.ArkUI.ArkUI.Full
1416   * @crossplatform
1417   * @atomicservice
1418   * @since arkts {'1.1':'12','1.2':'20'}
1419   * @arkts 1.1&1.2
1420   */
1421  cancelButtonStyle?: PickerDialogButtonStyle;
1422
1423  /**
1424   * Text style of selected items
1425   *
1426   * @type { ?PickerTextStyle }
1427   * @syscap SystemCapability.ArkUI.ArkUI.Full
1428   * @crossplatform
1429   * @since 10
1430   */
1431  /**
1432   * Font color, font size, and font weight of the selected item.
1433   *
1434   * @type { ?PickerTextStyle }
1435   * @syscap SystemCapability.ArkUI.ArkUI.Full
1436   * @crossplatform
1437   * @atomicservice
1438   * @since arkts {'1.1':'11','1.2':'20'}
1439   * @arkts 1.1&1.2
1440   */
1441  selectedTextStyle?: PickerTextStyle;
1442
1443  /**
1444   * Sets whether to enable the text style change animation during the scrolling process.
1445   * true: Disable the text style change animation.
1446   * false: Enable the text style change animation.
1447   *
1448   * @type { ?boolean }
1449   * @default false
1450   * @syscap SystemCapability.ArkUI.ArkUI.Full
1451   * @crossplatform
1452   * @atomicservice
1453   * @since arkts {'1.1':'15','1.2':'20'}
1454   * @arkts 1.1&1.2
1455   */
1456  disableTextStyleAnimation?: boolean;
1457
1458  /**
1459   * Style of the text items when the text style change animation during the scrolling process is disabled.
1460   *
1461   * <p><strong>NOTE</strong>:
1462   * <br>It is effective only when disableTextStyleAnimation is true.
1463   * </p>
1464   *
1465   * @type { ?TextPickerTextStyle }
1466   * @syscap SystemCapability.ArkUI.ArkUI.Full
1467   * @crossplatform
1468   * @atomicservice
1469   * @since arkts {'1.1':'15','1.2':'20'}
1470   * @arkts 1.1&1.2
1471   */
1472  defaultTextStyle?: TextPickerTextStyle;
1473
1474  /**
1475   * Called when the OK button in the dialog is clicked.
1476   *
1477   * @type { ?function }
1478   * @syscap SystemCapability.ArkUI.ArkUI.Full
1479   * @since 8
1480   */
1481  /**
1482   * Called when the OK button in the dialog is clicked.
1483   *
1484   * @type { ?function }
1485   * @syscap SystemCapability.ArkUI.ArkUI.Full
1486   * @crossplatform
1487   * @since 10
1488   */
1489  /**
1490   * Callback invoked when the OK button in the dialog box is clicked.
1491   *
1492   * @type { ?function }
1493   * @syscap SystemCapability.ArkUI.ArkUI.Full
1494   * @crossplatform
1495   * @atomicservice
1496   * @since arkts {'1.1':'11','1.2':'20'}
1497   * @arkts 1.1&1.2
1498   */
1499  onAccept?: (value: TextPickerResult) => void;
1500
1501  /**
1502   * Called when the Cancel button in the dialog is clicked.
1503   *
1504   * @type { ?function }
1505   * @syscap SystemCapability.ArkUI.ArkUI.Full
1506   * @since 8
1507   */
1508  /**
1509   * Called when the Cancel button in the dialog is clicked.
1510   *
1511   * @type { ?function }
1512   * @syscap SystemCapability.ArkUI.ArkUI.Full
1513   * @crossplatform
1514   * @since 10
1515   */
1516  /**
1517   * Callback invoked when the Cancel button in the dialog box is clicked.
1518   *
1519   * @type { ?function }
1520   * @syscap SystemCapability.ArkUI.ArkUI.Full
1521   * @crossplatform
1522   * @atomicservice
1523   * @since arkts {'1.1':'11','1.2':'20'}
1524   * @arkts 1.1&1.2
1525   */
1526  onCancel?: () => void;
1527
1528  /**
1529   * This event is triggered when a TextPicker text is selected in dialog.
1530   *
1531   * @type { ?function }
1532   * @syscap SystemCapability.ArkUI.ArkUI.Full
1533   * @since 8
1534   */
1535  /**
1536   * This event is triggered when a TextPicker text is selected in dialog.
1537   *
1538   * @type { ?function }
1539   * @syscap SystemCapability.ArkUI.ArkUI.Full
1540   * @crossplatform
1541   * @since 10
1542   */
1543  /**
1544   * Callback invoked when the text picker in the dialog box snaps to the selected item.
1545   *
1546   * @type { ?function }
1547   * @syscap SystemCapability.ArkUI.ArkUI.Full
1548   * @crossplatform
1549   * @atomicservice
1550   * @since arkts {'1.1':'11','1.2':'20'}
1551   * @arkts 1.1&1.2
1552   */
1553  onChange?: (value: TextPickerResult) => void;
1554
1555  /**
1556   * Callback invoked when the scrolling in the text picker of the dialog box stops.
1557   *
1558   * @type { ?Callback<TextPickerResult> }
1559   * @syscap SystemCapability.ArkUI.ArkUI.Full
1560   * @crossplatform
1561   * @atomicservice
1562   * @since arkts {'1.1':'14','1.2':'20'}
1563   * @arkts 1.1&1.2
1564   */
1565  onScrollStop?: Callback<TextPickerResult>;
1566
1567  /**
1568   * Represents the callback triggered during the scrolling of the text picker when an item enters the divider area.
1569   * Compared to the onChange event, this event is triggered earlier,
1570   * specifically when the scroll distance of the current column exceeds half the height of the selected item,
1571   * which indicates that the item has entered the divider area.
1572   *
1573   * <p><strong>NOTE</strong>:
1574   * <br>In scenarios where the picker contains linked columns,
1575   * <br>the use of this callback is not recommended.
1576   * <br>The reason is that it identifies nodes where items enter the divider area during scrolling.
1577   * <br>However, items that change in response to the scrolling do not themselves scroll. As a result,
1578   * <br>he callback's return values will only reflect changes for the currently scrolling column,
1579   * <br>while other non-scrolling columns will remain unchanged.
1580   * </p>
1581   *
1582   * @type { ?Callback<TextPickerResult> }
1583   * @syscap SystemCapability.ArkUI.ArkUI.Full
1584   * @crossplatform
1585   * @atomicservice
1586   * @since arkts {'1.1':'18','1.2':'20'}
1587   * @arkts 1.1&1.2
1588   */
1589  onEnterSelectedArea?: Callback<TextPickerResult>;
1590
1591  /**
1592   * Mask Region of dialog. The size cannot exceed the main window.
1593   *
1594   * @type { ?Rectangle }
1595   * @syscap SystemCapability.ArkUI.ArkUI.Full
1596   * @crossplatform
1597   * @since 10
1598   */
1599  /**
1600   * Mask area of the dialog box.
1601   * Events outside the mask area are transparently transmitted, and events within the mask area are not.
1602   *
1603   * @type { ?Rectangle }
1604   * @default { x: 0, y: 0, width: '100%', height: '100%' }
1605   * @syscap SystemCapability.ArkUI.ArkUI.Full
1606   * @crossplatform
1607   * @atomicservice
1608   * @since arkts {'1.1':'11','1.2':'20'}
1609   * @arkts 1.1&1.2
1610   */
1611  maskRect?: Rectangle;
1612
1613  /**
1614   * Defines the dialog alignment of the screen.
1615   *
1616   * @type { ?DialogAlignment }
1617   * @syscap SystemCapability.ArkUI.ArkUI.Full
1618   * @crossplatform
1619   * @since 10
1620   */
1621  /**
1622   * Alignment mode of the dialog box in the vertical direction.
1623   *
1624   * @type { ?DialogAlignment }
1625   * @default DialogAlignment.Default
1626   * @syscap SystemCapability.ArkUI.ArkUI.Full
1627   * @crossplatform
1628   * @atomicservice
1629   * @since arkts {'1.1':'11','1.2':'20'}
1630   * @arkts 1.1&1.2
1631   */
1632  alignment?: DialogAlignment;
1633
1634  /**
1635   * Defines the dialog offset.
1636   *
1637   * @type { ?Offset }
1638   * @syscap SystemCapability.ArkUI.ArkUI.Full
1639   * @crossplatform
1640   * @since 10
1641   */
1642  /**
1643   * Offset of the dialog box based on the alignment settings.
1644   *
1645   * @type { ?Offset }
1646   * @default { dx: 0 , dy: 0 }
1647   * @syscap SystemCapability.ArkUI.ArkUI.Full
1648   * @crossplatform
1649   * @atomicservice
1650   * @since arkts {'1.1':'11','1.2':'20'}
1651   * @arkts 1.1&1.2
1652   */
1653  offset?: Offset;
1654
1655  /**
1656   * Defines the textPickerDialog's background color
1657   *
1658   * @type { ?ResourceColor }
1659   * @default Color.Transparent
1660   * @syscap SystemCapability.ArkUI.ArkUI.Full
1661   * @crossplatform
1662   * @since 11
1663   */
1664  /**
1665   * Backplane color of the dialog box.
1666   *
1667   * @type { ?ResourceColor }
1668   * @default Color.Transparent
1669   * @syscap SystemCapability.ArkUI.ArkUI.Full
1670   * @crossplatform
1671   * @atomicservice
1672   * @since arkts {'1.1':'12','1.2':'20'}
1673   * @arkts 1.1&1.2
1674   */
1675  backgroundColor?: ResourceColor;
1676
1677  /**
1678   * Defines the textPickerDialog's background blur Style
1679   *
1680   * @type { ?BlurStyle }
1681   * @default BlurStyle.COMPONENT_ULTRA_THICK
1682   * @syscap SystemCapability.ArkUI.ArkUI.Full
1683   * @crossplatform
1684   * @since 11
1685   */
1686  /**
1687   * Background blur style of the dialog box.
1688   *
1689   * @type { ?BlurStyle }
1690   * @default BlurStyle.COMPONENT_ULTRA_THICK
1691   * @syscap SystemCapability.ArkUI.ArkUI.Full
1692   * @crossplatform
1693   * @atomicservice
1694   * @since arkts {'1.1':'12','1.2':'20'}
1695   * @arkts 1.1&1.2
1696   */
1697  backgroundBlurStyle?: BlurStyle;
1698
1699  /**
1700   * Options for customizing the background blur style.
1701   *
1702   * @type { ?BackgroundBlurStyleOptions }
1703   * @syscap SystemCapability.ArkUI.ArkUI.Full
1704   * @crossplatform
1705   * @atomicservice
1706   * @since arkts {'1.1':'19','1.2':'20'}
1707   * @arkts 1.1&1.2
1708   */
1709  backgroundBlurStyleOptions?: BackgroundBlurStyleOptions;
1710
1711  /**
1712   * Options for customizing the background effect.
1713   *
1714   * @type { ?BackgroundEffectOptions }
1715   * @syscap SystemCapability.ArkUI.ArkUI.Full
1716   * @crossplatform
1717   * @atomicservice
1718   * @since arkts {'1.1':'19','1.2':'20'}
1719   * @arkts 1.1&1.2
1720   */
1721  backgroundEffect?: BackgroundEffectOptions;
1722
1723  /**
1724   * Event callback when the dialog box appears.
1725   *
1726   * <p><strong>NOTE</strong>:
1727   * <br>1. The normal timing sequence is as follows:
1728   * onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear.
1729   * <br>2. You can set the callback event for changing the dialog box display effect in onDidAppear.
1730   * The settings take effect next time the dialog box appears.
1731   * <br>3. If the user closes the dialog box immediately after it appears,
1732   * onWillDisappearis invoked before onDidAppear.
1733   * <br>4. If the dialog box is closed before its entrance animation is finished, this callback is not invoked.
1734   * </p>
1735   *
1736   * @type { ?function }
1737   * @syscap SystemCapability.ArkUI.ArkUI.Full
1738   * @crossplatform
1739   * @atomicservice
1740   * @since arkts {'1.1':'12','1.2':'20'}
1741   * @arkts 1.1&1.2
1742   */
1743  onDidAppear?: () => void;
1744
1745  /**
1746   * Event callback when the dialog box disappears.
1747   *
1748   * <p><strong>NOTE</strong>:
1749   * <br>The normal timing sequence is as follows:
1750   * <br>onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear.
1751   * </p>
1752   *
1753   * @type { ?function }
1754   * @syscap SystemCapability.ArkUI.ArkUI.Full
1755   * @crossplatform
1756   * @atomicservice
1757   * @since arkts {'1.1':'12','1.2':'20'}
1758   * @arkts 1.1&1.2
1759   */
1760  onDidDisappear?: () => void;
1761
1762  /**
1763   * Event callback when the dialog box is about to appear.
1764   *
1765   * <p><strong>NOTE</strong>:
1766   * <br>1. The normal timing sequence is as follows:
1767   * <br>onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear.
1768   * <br>2. You can set the callback event for changing the dialog box display effect in onWillAppear.
1769   * <br>the settings take effect next time the dialog box appears.
1770   * </p>
1771   *
1772   * @type { ?function }
1773   * @syscap SystemCapability.ArkUI.ArkUI.Full
1774   * @crossplatform
1775   * @atomicservice
1776   * @since arkts {'1.1':'12','1.2':'20'}
1777   * @arkts 1.1&1.2
1778   */
1779  onWillAppear?: () => void;
1780
1781  /**
1782   * Event callback when the dialog box is about to disappear.
1783   *
1784   * <p><strong>NOTE</strong>:
1785   * <br>1. The normal timing sequence is as follows:
1786   * onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear.
1787   * <br>2. If the user closes the dialog box immediately after it appears,
1788   * onWillDisappear is invoked before onDidAppear.
1789   * </p>
1790   *
1791   * @type { ?function }
1792   * @syscap SystemCapability.ArkUI.ArkUI.Full
1793   * @crossplatform
1794   * @atomicservice
1795   * @since arkts {'1.1':'12','1.2':'20'}
1796   * @arkts 1.1&1.2
1797   */
1798  onWillDisappear?: () => void;
1799
1800  /**
1801   * Shadow of the dialog box.
1802   * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD when the dialog box is focused
1803   * and ShadowStyle.OUTER_FLOATING_SM otherwise.
1804   *
1805   * @type { ?(ShadowOptions | ShadowStyle) }
1806   * @syscap SystemCapability.ArkUI.ArkUI.Full
1807   * @crossplatform
1808   * @atomicservice
1809   * @since arkts {'1.1':'12','1.2':'20'}
1810   * @arkts 1.1&1.2
1811   */
1812  shadow?: ShadowOptions | ShadowStyle;
1813
1814  /**
1815   * Whether to enable the hover mode.
1816   *
1817   * @type { ?boolean }
1818   * @default false - meaning not to enable the hover mode.
1819   * @syscap SystemCapability.ArkUI.ArkUI.Full
1820   * @crossplatform
1821   * @atomicservice
1822   * @since arkts {'1.1':'14','1.2':'20'}
1823   * @arkts 1.1&1.2
1824   */
1825  enableHoverMode?: boolean;
1826
1827  /**
1828   * Display area of the dialog box in hover mode.
1829   *
1830   * @type { ?HoverModeAreaType }
1831   * @default HoverModeAreaType.BOTTOM_SCREEN
1832   * @syscap SystemCapability.ArkUI.ArkUI.Full
1833   * @crossplatform
1834   * @atomicservice
1835   * @since arkts {'1.1':'14','1.2':'20'}
1836   * @arkts 1.1&1.2
1837   */
1838  hoverModeArea?: HoverModeAreaType;
1839
1840  /**
1841   * Whether to enable haptic feedback.
1842   * true (default): Haptic feedback is enabled.
1843   * false: Haptic feedback is disabled.
1844   *
1845   * <p><strong>NOTE</strong>:
1846   * <br>To enable haptic feedback, you must declare the ohos.permission.VIBRATE permission
1847   * <br>under requestPermissions in the module.json5 file of the project.
1848   * <br>"requestPermissions": [{"name": "ohos.permission.VIBRATE"}].
1849   * </p>
1850   *
1851   * @type { ?boolean }
1852   * @default true
1853   * @syscap SystemCapability.ArkUI.ArkUI.Full
1854   * @atomicservice
1855   * @since arkts {'1.1':'18','1.2':'20'}
1856   * @arkts 1.1&1.2
1857   */
1858  enableHapticFeedback?: boolean;
1859
1860  /**
1861   * Background style of selected items.
1862   *
1863   * @type { ?PickerBackgroundStyle }
1864   * @default { color: $r('sys.color.comp_background_tertiary'), borderRadius: $r('sys.float.corner_radius_level12') }
1865   * @syscap SystemCapability.ArkUI.ArkUI.Full
1866   * @atomicservice
1867   * @since 20
1868   */
1869  selectedBackgroundStyle?: PickerBackgroundStyle;
1870}
1871
1872/**
1873 * Defines the TextPickerDialogOptionsExt for Text Picker Dialog.
1874 *
1875 * @extends TextPickerOptions
1876 * @interface TextPickerDialogOptionsExt
1877 * @syscap SystemCapability.ArkUI.ArkUI.Full
1878 * @crossplatform
1879 * @atomicservice
1880 * @since 20
1881 */
1882declare interface TextPickerDialogOptionsExt extends TextPickerOptions {
1883  /**
1884   * Called when the default height of the selected element is set.
1885   *
1886   * @type { ?(number | string) }
1887   * @syscap SystemCapability.ArkUI.ArkUI.Full
1888   * @crossplatform
1889   * @atomicservice
1890   * @since 20
1891   */
1892  defaultPickerItemHeight?: number | string;
1893
1894  /**
1895   * Can scroll loop if true is set, on the contrary it can not.
1896   *
1897   * @type { ?boolean }
1898   * @default true
1899   * @syscap SystemCapability.ArkUI.ArkUI.Full
1900   * @crossplatform
1901   * @atomicservice
1902   * @since 20
1903   */
1904  canLoop?: boolean;
1905
1906  /**
1907   * Text style of disappearing items.
1908   *
1909   * @type { ?TextPickerTextStyle }
1910   * @syscap SystemCapability.ArkUI.ArkUI.Full
1911   * @crossplatform
1912   * @atomicservice
1913   * @since 20
1914   */
1915  disappearTextStyle?: TextPickerTextStyle;
1916
1917  /**
1918   * Text style of normal items
1919   *
1920   * @type { ?TextPickerTextStyle }
1921   * @syscap SystemCapability.ArkUI.ArkUI.Full
1922   * @crossplatform
1923   * @atomicservice
1924   * @since 20
1925   */
1926  textStyle?: TextPickerTextStyle;
1927
1928  /**
1929   * Style of accept button.
1930   *
1931   * @type { ?PickerDialogButtonStyle }
1932   * @syscap SystemCapability.ArkUI.ArkUI.Full
1933   * @crossplatform
1934   * @atomicservice
1935   * @since 20
1936   */
1937  acceptButtonStyle?: PickerDialogButtonStyle;
1938
1939  /**
1940   * Style of cancel button.
1941   *
1942   * @type { ?PickerDialogButtonStyle }
1943   * @syscap SystemCapability.ArkUI.ArkUI.Full
1944   * @crossplatform
1945   * @atomicservice
1946   * @since 20
1947   */
1948  cancelButtonStyle?: PickerDialogButtonStyle;
1949
1950  /**
1951   * Text style of selected items
1952   *
1953   * @type { ?TextPickerTextStyle }
1954   * @syscap SystemCapability.ArkUI.ArkUI.Full
1955   * @crossplatform
1956   * @atomicservice
1957   * @since 20
1958   */
1959  selectedTextStyle?: TextPickerTextStyle;
1960
1961  /**
1962   * Defines whether to disable the text style animation.
1963   *
1964   * @type { ?boolean }
1965   * @syscap SystemCapability.ArkUI.ArkUI.Full
1966   * @crossplatform
1967   * @atomicservice
1968   * @since 20
1969   */
1970  disableTextStyleAnimation?: boolean;
1971
1972  /**
1973   * Defines to set the default text style for options.
1974   *
1975   * @type { ?TextPickerTextStyle }
1976   * @syscap SystemCapability.ArkUI.ArkUI.Full
1977   * @crossplatform
1978   * @atomicservice
1979   * @since 20
1980   */
1981  defaultTextStyle?: TextPickerTextStyle;
1982
1983  /**
1984   * Called when the OK button in the dialog is clicked.
1985   *
1986   * @type { ?Callback<TextPickerResult> }
1987   * @syscap SystemCapability.ArkUI.ArkUI.Full
1988   * @crossplatform
1989   * @atomicservice
1990   * @since 20
1991   */
1992  onAccept?: Callback<TextPickerResult>;
1993
1994  /**
1995   * Called when the Cancel button in the dialog is clicked.
1996   *
1997   * @type { ?VoidCallback }
1998   * @syscap SystemCapability.ArkUI.ArkUI.Full
1999   * @crossplatform
2000   * @atomicservice
2001   * @since 20
2002   */
2003  onCancel?: VoidCallback;
2004
2005  /**
2006   * This event is triggered when a TextPicker text is selected in dialog.
2007   *
2008   * @type { ?Callback<TextPickerResult> }
2009   * @syscap SystemCapability.ArkUI.ArkUI.Full
2010   * @crossplatform
2011   * @atomicservice
2012   * @since 20
2013   */
2014  onChange?: Callback<TextPickerResult>;
2015
2016  /**
2017   * This event is triggered when a TextPicker text is selected and scrolling has stopped in dialog.
2018   *
2019   * @type { ?Callback<TextPickerResult> }
2020   * @syscap SystemCapability.ArkUI.ArkUI.Full
2021   * @crossplatform
2022   * @atomicservice
2023   * @since 20
2024   */
2025  onScrollStop?: Callback<TextPickerResult>;
2026
2027  /**
2028   * This event is triggered when an item enters the selected area in dialog.
2029   *
2030   * @type { ?Callback<TextPickerResult> }
2031   * @syscap SystemCapability.ArkUI.ArkUI.Full
2032   * @crossplatform
2033   * @atomicservice
2034   * @since 20
2035   */
2036  onEnterSelectedArea?: Callback<TextPickerResult>;
2037
2038  /**
2039   * Mask Region of dialog. The size cannot exceed the main window.
2040   *
2041   * @type { ?Rectangle }
2042   * @syscap SystemCapability.ArkUI.ArkUI.Full
2043   * @crossplatform
2044   * @atomicservice
2045   * @since 20
2046   */
2047  maskRect?: Rectangle;
2048
2049  /**
2050   * Defines the dialog alignment of the screen.
2051   *
2052   * @type { ?DialogAlignment }
2053   * @syscap SystemCapability.ArkUI.ArkUI.Full
2054   * @crossplatform
2055   * @atomicservice
2056   * @since 20
2057   */
2058  alignment?: DialogAlignment;
2059
2060  /**
2061   * Defines the dialog offset.
2062   *
2063   * @type { ?Offset }
2064   * @syscap SystemCapability.ArkUI.ArkUI.Full
2065   * @crossplatform
2066   * @atomicservice
2067   * @since 20
2068   */
2069  offset?: Offset;
2070
2071  /**
2072   * Defines the textPickerDialog's background color
2073   *
2074   * @type { ?ResourceColor }
2075   * @default Color.Transparent
2076   * @syscap SystemCapability.ArkUI.ArkUI.Full
2077   * @crossplatform
2078   * @atomicservice
2079   * @since 20
2080   */
2081  backgroundColor?: ResourceColor;
2082
2083  /**
2084   * Defines the textPickerDialog's background blur Style
2085   *
2086   * @type { ?BlurStyle }
2087   * @default BlurStyle.COMPONENT_ULTRA_THICK
2088   * @syscap SystemCapability.ArkUI.ArkUI.Full
2089   * @crossplatform
2090   * @atomicservice
2091   * @since 20
2092   */
2093  backgroundBlurStyle?: BlurStyle;
2094
2095  /**
2096   * Defines the textPickerDialog's background blur style with options
2097   *
2098   * @type { ?BackgroundBlurStyleOptions }
2099   * @syscap SystemCapability.ArkUI.ArkUI.Full
2100   * @crossplatform
2101   * @atomicservice
2102   * @since 20
2103   */
2104  backgroundBlurStyleOptions?: BackgroundBlurStyleOptions;
2105
2106  /**
2107   * Defines the textPickerDialog's background effect with options
2108   *
2109   * @type { ?BackgroundEffectOptions }
2110   * @syscap SystemCapability.ArkUI.ArkUI.Full
2111   * @crossplatform
2112   * @atomicservice
2113   * @since 20
2114   */
2115  backgroundEffect?: BackgroundEffectOptions;
2116
2117  /**
2118   * Callback function when the dialog appears.
2119   *
2120   * @type { ?VoidCallback }
2121   * @syscap SystemCapability.ArkUI.ArkUI.Full
2122   * @crossplatform
2123   * @atomicservice
2124   * @since 20
2125   */
2126  onDidAppear?: VoidCallback;
2127
2128  /**
2129   * Callback function when the dialog disappears.
2130   *
2131   * @type { ?VoidCallback }
2132   * @syscap SystemCapability.ArkUI.ArkUI.Full
2133   * @crossplatform
2134   * @atomicservice
2135   * @since 20
2136   */
2137  onDidDisappear?: VoidCallback;
2138
2139  /**
2140   * Callback function before the dialog openAnimation starts.
2141   *
2142   * @type { ?VoidCallback }
2143   * @syscap SystemCapability.ArkUI.ArkUI.Full
2144   * @crossplatform
2145   * @atomicservice
2146   * @since 20
2147   */
2148  onWillAppear?: VoidCallback;
2149
2150  /**
2151   * Callback function before the dialog closeAnimation starts.
2152   *
2153   * @type { ?VoidCallback }
2154   * @syscap SystemCapability.ArkUI.ArkUI.Full
2155   * @crossplatform
2156   * @atomicservice
2157   * @since 20
2158   */
2159  onWillDisappear?: VoidCallback;
2160
2161  /**
2162   * Defines the dialog's shadow.
2163   *
2164   * @type { ?(ShadowOptions | ShadowStyle) }
2165   * @syscap SystemCapability.ArkUI.ArkUI.Full
2166   * @crossplatform
2167   * @atomicservice
2168   * @since 20
2169   */
2170  shadow?: ShadowOptions | ShadowStyle;
2171
2172  /**
2173   * Defines whether to respond to the hover mode.
2174   *
2175   * @type { ?boolean }
2176   * @default false
2177   * @syscap SystemCapability.ArkUI.ArkUI.Full
2178   * @crossplatform
2179   * @atomicservice
2180   * @since 20
2181   */
2182  enableHoverMode?: boolean;
2183
2184  /**
2185   * Defines the dialog's display area in hover mode.
2186   *
2187   * @type { ?HoverModeAreaType }
2188   * @default HoverModeAreaType.BOTTOM_SCREEN
2189   * @syscap SystemCapability.ArkUI.ArkUI.Full
2190   * @crossplatform
2191   * @atomicservice
2192   * @since 20
2193   */
2194  hoverModeArea?: HoverModeAreaType;
2195
2196  /**
2197   * Enable or disable haptic feedback.
2198   *
2199   * @type { ?boolean }
2200   * @default true
2201   * @syscap SystemCapability.ArkUI.ArkUI.Full
2202   * @atomicservice
2203   * @since 20
2204   */
2205  enableHapticFeedback?: boolean;
2206
2207  /**
2208   * Background style of selected items.
2209   *
2210   * @type { ?PickerBackgroundStyle }
2211   * @default { color: $r('sys.color.comp_background_tertiary'), borderRadius: $r('sys.float.corner_radius_level12') }
2212   * @syscap SystemCapability.ArkUI.ArkUI.Full
2213   * @atomicservice
2214   * @since 20
2215   */
2216  selectedBackgroundStyle?: PickerBackgroundStyle;
2217}
2218
2219/**
2220 * Defines TextPickerDialog which uses show method to show TextPicker dialog.
2221 *
2222 * @syscap SystemCapability.ArkUI.ArkUI.Full
2223 * @since 8
2224 */
2225/**
2226 * Defines TextPickerDialog which uses show method to show TextPicker dialog.
2227 *
2228 * @syscap SystemCapability.ArkUI.ArkUI.Full
2229 * @crossplatform
2230 * @since 10
2231 */
2232/**
2233 * A text picker dialog box is a dialog box that allows users to select text from the given range.
2234 *
2235 * @syscap SystemCapability.ArkUI.ArkUI.Full
2236 * @crossplatform
2237 * @atomicservice
2238 * @since arkts {'1.1':'11','1.2':'20'}
2239 * @arkts 1.1&1.2
2240 */
2241declare class TextPickerDialog {
2242  /**
2243   * Invoking method display.
2244   *
2245   * @param { TextPickerDialogOptions } options
2246   * @syscap SystemCapability.ArkUI.ArkUI.Full
2247   * @since 8
2248   */
2249  /**
2250   * Invoking method display.
2251   *
2252   * @param { TextPickerDialogOptions } options
2253   * @syscap SystemCapability.ArkUI.ArkUI.Full
2254   * @crossplatform
2255   * @since 10
2256   */
2257  /**
2258   * Shows a text picker in the given settings.
2259   *
2260   * @param { TextPickerDialogOptions } options - Parameters of the text picker dialog box.
2261   * @syscap SystemCapability.ArkUI.ArkUI.Full
2262   * @crossplatform
2263   * @atomicservice
2264   * @since 11
2265   * @deprecated since 18
2266   * @useinstead ohos.arkui.UIContext.UIContext#showTextPickerDialog
2267   */
2268  static show(options?: TextPickerDialogOptions);
2269}
2270
2271/**
2272 * Defines TextPicker Component.
2273 *
2274 * @syscap SystemCapability.ArkUI.ArkUI.Full
2275 * @since 8
2276 */
2277/**
2278 * Defines TextPicker Component.
2279 *
2280 * @syscap SystemCapability.ArkUI.ArkUI.Full
2281 * @crossplatform
2282 * @since 10
2283 */
2284/**
2285 * Creates a text picker based on the selection range specified by range.
2286 *
2287 * @syscap SystemCapability.ArkUI.ArkUI.Full
2288 * @crossplatform
2289 * @atomicservice
2290 * @since 11
2291 */
2292declare const TextPicker: TextPickerInterface;
2293
2294/**
2295 * Defines TextPicker Component instance.
2296 *
2297 * @syscap SystemCapability.ArkUI.ArkUI.Full
2298 * @since 8
2299 */
2300/**
2301 * Defines TextPicker Component instance.
2302 *
2303 * @syscap SystemCapability.ArkUI.ArkUI.Full
2304 * @crossplatform
2305 * @since 10
2306 */
2307/**
2308 * Defines TextPicker Component instance.
2309 *
2310 * @syscap SystemCapability.ArkUI.ArkUI.Full
2311 * @crossplatform
2312 * @atomicservice
2313 * @since 11
2314 */
2315declare const TextPickerInstance: TextPickerAttribute;
2316
2317