1/*
2 * Copyright (c) 2023-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
16const CHECKBOX_CONTAINER_HEIGHT = 48;
17const CONTENT_MAX_LINES = 2;
18const DIVIDER_CONTAINER_WIDTH = 16;
19const DIVIDER_HEIGHT = 24;
20const DIVIDER_WIDTH = 2;
21const LOADING_PROGRESS_WIDTH = 40;
22const LOADING_PROGRESS_HEIGHT = 48;
23const ITEM_TEXT_SIZE = 14;
24
25export class TipsDialog extends ViewPU {
26  constructor(e, o, t, r = -1) {
27    super(e, t, r);
28    this.controller = void 0;
29    this.imageRes = void 0;
30    this.imageSize = { width: '100%', height: 180 };
31    this.title = '';
32    this.content = '';
33    this.checkTips = '';
34    this.__isChecked = new ObservedPropertySimplePU(!1, this, 'isChecked');
35    this.primaryButton = { value: '' };
36    this.secondaryButton = { value: '' };
37    this.setInitiallyProvidedValue(o);
38  }
39
40  setInitiallyProvidedValue(e) {
41    void 0 !== e.controller && (this.controller = e.controller);
42    void 0 !== e.imageRes && (this.imageRes = e.imageRes);
43    void 0 !== e.imageSize && (this.imageSize = e.imageSize);
44    void 0 !== e.title && (this.title = e.title);
45    void 0 !== e.content && (this.content = e.content);
46    void 0 !== e.checkTips && (this.checkTips = e.checkTips);
47    void 0 !== e.isChecked && (this.isChecked = e.isChecked);
48    void 0 !== e.primaryButton && (this.primaryButton = e.primaryButton);
49    void 0 !== e.secondaryButton && (this.secondaryButton = e.secondaryButton);
50  }
51
52  updateStateVars(e) {
53  }
54
55  purgeVariableDependenciesOnElmtId(e) {
56    this.__isChecked.purgeDependencyOnElmtId(e);
57  }
58
59  aboutToBeDeleted() {
60    this.__isChecked.aboutToBeDeleted();
61    SubscriberManager.Get().delete(this.id__());
62    this.aboutToBeDeletedInternal();
63  }
64
65  setController(e) {
66    this.controller = e;
67  }
68
69  get isChecked() {
70    return this.__isChecked.get();
71  }
72
73  set isChecked(e) {
74    this.__isChecked.set(e);
75  }
76
77  initialRender() {
78    this.observeComponentCreation(((e, o) => {
79      ViewStackProcessor.StartGetAccessRecordingFor(e);
80      Column.create();
81      Column.backgroundBlurStyle(BlurStyle.Thick);
82      Column.borderRadius({
83        id: -1,
84        type: 10002,
85        params: ['sys.float.ohos_id_corner_radius_dialog'],
86        bundleName: '',
87        moduleName: ''
88      });
89      Column.margin({
90        left: {
91          id: -1,
92          type: 10002,
93          params: ['sys.float.ohos_id_dialog_margin_start'],
94          bundleName: '',
95          moduleName: ''
96        },
97        right: {
98          id: -1,
99          type: 10002,
100          params: ['sys.float.ohos_id_dialog_margin_end'],
101          bundleName: '',
102          moduleName: ''
103        },
104        bottom: {
105          id: -1,
106          type: 10002,
107          params: ['sys.float.ohos_id_dialog_margin_bottom'],
108          bundleName: '',
109          moduleName: ''
110        }
111      });
112      Column.backgroundColor({
113        id: -1,
114        type: 10001,
115        params: ['sys.color.ohos_id_color_dialog_bg'],
116        bundleName: '',
117        moduleName: ''
118      });
119      o || Column.pop();
120      ViewStackProcessor.StopGetAccessRecording();
121    }));
122    this.observeComponentCreation(((e, o) => {
123      ViewStackProcessor.StartGetAccessRecordingFor(e);
124      Row.create();
125      Row.width('100%');
126      Row.padding({ left: 24, right: 24 });
127      Row.margin({ top: 24 });
128      o || Row.pop();
129      ViewStackProcessor.StopGetAccessRecording();
130    }));
131    this.observeComponentCreation(((e, o) => {
132      ViewStackProcessor.StartGetAccessRecordingFor(e);
133      Column.create();
134      Column.layoutWeight(1);
135      Column.clip(!0);
136      o || Column.pop();
137      ViewStackProcessor.StopGetAccessRecording();
138    }));
139    this.observeComponentCreation(((e, o) => {
140      ViewStackProcessor.StartGetAccessRecordingFor(e);
141      Image.create(this.imageRes);
142      Image.size(this.imageSize);
143      Image.objectFit(ImageFit.Fill);
144      o || Image.pop();
145      ViewStackProcessor.StopGetAccessRecording();
146    }));
147    Column.pop();
148    Row.pop();
149    this.observeComponentCreation(((e, o) => {
150      ViewStackProcessor.StartGetAccessRecordingFor(e);
151      Row.create();
152      Row.padding({ left: 24, right: 24 });
153      Row.margin({ top: 16 });
154      o || Row.pop();
155      ViewStackProcessor.StopGetAccessRecording();
156    }));
157    this.observeComponentCreation(((e, o) => {
158      ViewStackProcessor.StartGetAccessRecordingFor(e);
159      Text.create(this.title);
160      Text.fontSize({
161        id: -1,
162        type: 10002,
163        params: ['sys.float.ohos_id_text_size_headline8'],
164        bundleName: '',
165        moduleName: ''
166      });
167      Text.fontWeight(FontWeight.Medium);
168      Text.fontColor({
169        id: -1,
170        type: 10001,
171        params: ['sys.color.ohos_id_color_text_primary'],
172        bundleName: '',
173        moduleName: ''
174      });
175      Text.textAlign(TextAlign.Center);
176      o || Text.pop();
177      ViewStackProcessor.StopGetAccessRecording();
178    }));
179    Text.pop();
180    Row.pop();
181    this.observeComponentCreation(((e, o) => {
182      ViewStackProcessor.StartGetAccessRecordingFor(e);
183      If.create();
184      this.content ? this.ifElseBranchUpdateFunction(0, (() => {
185        this.observeComponentCreation(((e, o) => {
186          ViewStackProcessor.StartGetAccessRecordingFor(e);
187          Row.create();
188          Row.padding({ left: 24, right: 24, top: 8, bottom: 8 });
189          Row.width('100%');
190          o || Row.pop();
191          ViewStackProcessor.StopGetAccessRecording();
192        }));
193        this.observeComponentCreation(((e, o) => {
194          ViewStackProcessor.StartGetAccessRecordingFor(e);
195          Text.create(this.content);
196          Text.fontSize({
197            id: -1,
198            type: 10002,
199            params: ['sys.float.ohos_id_text_size_body2'],
200            bundleName: '',
201            moduleName: ''
202          });
203          Text.fontWeight(FontWeight.Medium);
204          Text.fontColor({
205            id: -1,
206            type: 10001,
207            params: ['sys.color.ohos_id_color_text_primary'],
208            bundleName: '',
209            moduleName: ''
210          });
211          Text.textAlign(TextAlign.Center);
212          Text.minFontSize({
213            id: -1,
214            type: 10002,
215            params: ['sys.float.ohos_id_text_size_body3'],
216            bundleName: '',
217            moduleName: ''
218          });
219          o || Text.pop();
220          ViewStackProcessor.StopGetAccessRecording();
221        }));
222        Text.pop();
223        Row.pop();
224      })) : If.branchId(1);
225      o || If.pop();
226      ViewStackProcessor.StopGetAccessRecording();
227    }));
228    If.pop();
229    this.observeComponentCreation(((e, o) => {
230      ViewStackProcessor.StartGetAccessRecordingFor(e);
231      Row.create();
232      Row.height(CHECKBOX_CONTAINER_HEIGHT);
233      Row.width('100%');
234      Row.padding({ left: 24, right: 24, top: 8, bottom: 8 });
235      o || Row.pop();
236      ViewStackProcessor.StopGetAccessRecording();
237    }));
238    this.observeComponentCreation(((e, o) => {
239      ViewStackProcessor.StartGetAccessRecordingFor(e);
240      Checkbox.create({ name: 'checkbox', group: 'checkboxGroup' });
241      Checkbox.select(this.isChecked);
242      Checkbox.onChange((e => {
243        this.isChecked = e;
244      }));
245      Checkbox.margin({ left: 0, right: 8 });
246      o || Checkbox.pop();
247      ViewStackProcessor.StopGetAccessRecording();
248    }));
249    Checkbox.pop();
250    this.observeComponentCreation(((e, o) => {
251      ViewStackProcessor.StartGetAccessRecordingFor(e);
252      Text.create(this.checkTips);
253      Text.fontSize({
254        id: -1,
255        type: 10002,
256        params: ['sys.float.ohos_id_text_size_body2'],
257        bundleName: '',
258        moduleName: ''
259      });
260      Text.fontWeight(FontWeight.Medium);
261      Text.fontColor({
262        id: -1,
263        type: 10001,
264        params: ['sys.color.ohos_id_color_text_primary'],
265        bundleName: '',
266        moduleName: ''
267      });
268      Text.maxLines(CONTENT_MAX_LINES);
269      Text.layoutWeight(1);
270      Text.focusOnTouch(!0);
271      Text.onClick((() => {
272        this.isChecked = !this.isChecked;
273      }));
274      o || Text.pop();
275      ViewStackProcessor.StopGetAccessRecording();
276    }));
277    Text.pop();
278    Row.pop();
279    this.observeComponentCreation(((e, o) => {
280      ViewStackProcessor.StartGetAccessRecordingFor(e);
281      Row.create();
282      Row.width('100%');
283      Row.padding({ left: 16, right: 16, top: 16, bottom: 16 });
284      o || Row.pop();
285      ViewStackProcessor.StopGetAccessRecording();
286    }));
287    this.observeComponentCreation(((e, o) => {
288      ViewStackProcessor.StartGetAccessRecordingFor(e);
289      If.create();
290      this.primaryButton.value ? this.ifElseBranchUpdateFunction(0, (() => {
291        this.observeComponentCreation(((e, o) => {
292          ViewStackProcessor.StartGetAccessRecordingFor(e);
293          Button.createWithLabel(this.primaryButton.value);
294          Button.fontSize({
295            id: -1,
296            type: 10002,
297            params: ['sys.float.ohos_id_text_size_button1'],
298            bundleName: '',
299            moduleName: ''
300          });
301          Button.fontWeight(FontWeight.Medium);
302          Button.layoutWeight(1);
303          Button.backgroundColor(this.primaryButton.background ? this.primaryButton.background : {
304            id: -1,
305            type: 10001,
306            params: ['sys.color.ohos_id_color_background_transparent'],
307            bundleName: '',
308            moduleName: ''
309          });
310          Button.fontColor(this.primaryButton.fontColor ? this.primaryButton.fontColor : {
311            id: -1,
312            type: 10001,
313            params: ['sys.color.ohos_id_color_text_primary_activated'],
314            bundleName: '',
315            moduleName: ''
316          });
317          Button.onClick((() => {
318            this.primaryButton.action && this.primaryButton.action();
319            this.controller.close();
320          }));
321          o || Button.pop();
322          ViewStackProcessor.StopGetAccessRecording();
323        }));
324        Button.pop();
325      })) : If.branchId(1);
326      o || If.pop();
327      ViewStackProcessor.StopGetAccessRecording();
328    }));
329    If.pop();
330    this.observeComponentCreation(((e, o) => {
331      ViewStackProcessor.StartGetAccessRecordingFor(e);
332      If.create();
333      this.secondaryButton.value && this.primaryButton.value ? this.ifElseBranchUpdateFunction(0, (() => {
334        this.observeComponentCreation(((e, o) => {
335          ViewStackProcessor.StartGetAccessRecordingFor(e);
336          Column.create();
337          Column.width(DIVIDER_CONTAINER_WIDTH);
338          Column.alignItems(HorizontalAlign.Center);
339          o || Column.pop();
340          ViewStackProcessor.StopGetAccessRecording();
341        }));
342        this.observeComponentCreation(((e, o) => {
343          ViewStackProcessor.StartGetAccessRecordingFor(e);
344          If.create();
345          this.secondaryButton.background ? If.branchId(1) : this.ifElseBranchUpdateFunction(0, (() => {
346            this.observeComponentCreation(((e, o) => {
347              ViewStackProcessor.StartGetAccessRecordingFor(e);
348              Divider.create();
349              Divider.width(DIVIDER_WIDTH);
350              Divider.height(DIVIDER_HEIGHT);
351              Divider.color({
352                id: -1,
353                type: 10001,
354                params: ['sys.color.ohos_id_color_list_separator'],
355                bundleName: '',
356                moduleName: ''
357              });
358              Divider.vertical(!0);
359              o || Divider.pop();
360              ViewStackProcessor.StopGetAccessRecording();
361            }));
362          }));
363          o || If.pop();
364          ViewStackProcessor.StopGetAccessRecording();
365        }));
366        If.pop();
367        Column.pop();
368      })) : If.branchId(1);
369      o || If.pop();
370      ViewStackProcessor.StopGetAccessRecording();
371    }));
372    If.pop();
373    this.observeComponentCreation(((e, o) => {
374      ViewStackProcessor.StartGetAccessRecordingFor(e);
375      If.create();
376      this.secondaryButton.value ? this.ifElseBranchUpdateFunction(0, (() => {
377        this.observeComponentCreation(((e, o) => {
378          ViewStackProcessor.StartGetAccessRecordingFor(e);
379          Button.createWithLabel(this.secondaryButton.value);
380          Button.fontSize({
381            id: -1,
382            type: 10002,
383            params: ['sys.float.ohos_id_text_size_button1'],
384            bundleName: '',
385            moduleName: ''
386          });
387          Button.fontWeight(FontWeight.Medium);
388          Button.layoutWeight(1);
389          Button.backgroundColor(this.secondaryButton.background ? this.secondaryButton.background : {
390            id: -1,
391            type: 10001,
392            params: ['sys.color.ohos_id_color_background_transparent'],
393            bundleName: '',
394            moduleName: ''
395          });
396          Button.fontColor(this.secondaryButton.fontColor ? this.secondaryButton.fontColor : {
397            id: -1,
398            type: 10001,
399            params: ['sys.color.ohos_id_color_text_primary_activated'],
400            bundleName: '',
401            moduleName: ''
402          });
403          Button.onClick((() => {
404            this.secondaryButton.action && this.secondaryButton.action();
405            this.controller.close();
406          }));
407          o || Button.pop();
408          ViewStackProcessor.StopGetAccessRecording();
409        }));
410        Button.pop();
411      })) : If.branchId(1);
412      o || If.pop();
413      ViewStackProcessor.StopGetAccessRecording();
414    }));
415    If.pop();
416    Row.pop();
417    Column.pop();
418  }
419
420  rerender() {
421    this.updateDirtyElements();
422  }
423}
424
425export class SelectDialog extends ViewPU {
426  constructor(e, o, t, r = -1) {
427    super(e, t, r);
428    this.controller = void 0;
429    this.title = '';
430    this.content = '';
431    this.selectedIndex = -1;
432    this.confirm = { value: '' };
433    this.radioContent = [];
434    this.setInitiallyProvidedValue(o);
435  }
436
437  setInitiallyProvidedValue(e) {
438    void 0 !== e.controller && (this.controller = e.controller);
439    void 0 !== e.title && (this.title = e.title);
440    void 0 !== e.content && (this.content = e.content);
441    void 0 !== e.selectedIndex && (this.selectedIndex = e.selectedIndex);
442    void 0 !== e.confirm && (this.confirm = e.confirm);
443    void 0 !== e.radioContent && (this.radioContent = e.radioContent);
444  }
445
446  updateStateVars(e) {
447  }
448
449  purgeVariableDependenciesOnElmtId(e) {
450  }
451
452  aboutToBeDeleted() {
453    SubscriberManager.Get().delete(this.id__());
454    this.aboutToBeDeletedInternal();
455  }
456
457  setController(e) {
458    this.controller = e;
459  }
460
461  initialRender() {
462    this.observeComponentCreation(((e, o) => {
463      ViewStackProcessor.StartGetAccessRecordingFor(e);
464      Column.create();
465      Column.backgroundBlurStyle(BlurStyle.Thick);
466      Column.borderRadius({
467        id: -1,
468        type: 10002,
469        params: ['sys.float.ohos_id_corner_radius_dialog'],
470        bundleName: '',
471        moduleName: ''
472      });
473      Column.margin({
474        left: {
475          id: -1,
476          type: 10002,
477          params: ['sys.float.ohos_id_dialog_margin_start'],
478          bundleName: '',
479          moduleName: ''
480        },
481        right: {
482          id: -1,
483          type: 10002,
484          params: ['sys.float.ohos_id_dialog_margin_end'],
485          bundleName: '',
486          moduleName: ''
487        },
488        bottom: {
489          id: -1,
490          type: 10002,
491          params: ['sys.float.ohos_id_dialog_margin_bottom'],
492          bundleName: '',
493          moduleName: ''
494        }
495      });
496      Column.backgroundColor({
497        id: -1,
498        type: 10001,
499        params: ['sys.color.ohos_id_color_dialog_bg'],
500        bundleName: '',
501        moduleName: ''
502      });
503      o || Column.pop();
504      ViewStackProcessor.StopGetAccessRecording();
505    }));
506    this.observeComponentCreation(((e, o) => {
507      ViewStackProcessor.StartGetAccessRecordingFor(e);
508      Row.create();
509      Row.padding({ left: 24, right: 24, top: 24 });
510      Row.constraintSize({ minHeight: 56 });
511      o || Row.pop();
512      ViewStackProcessor.StopGetAccessRecording();
513    }));
514    this.observeComponentCreation(((e, o) => {
515      ViewStackProcessor.StartGetAccessRecordingFor(e);
516      Text.create(this.title);
517      Text.fontSize({
518        id: -1,
519        type: 10002,
520        params: ['sys.float.ohos_id_text_size_dialog_tittle'],
521        bundleName: '',
522        moduleName: ''
523      });
524      Text.fontWeight(FontWeight.Medium);
525      Text.maxLines(CONTENT_MAX_LINES);
526      Text.minFontSize({
527        id: -1,
528        type: 10002,
529        params: ['sys.float.ohos_id_text_size_sub_title1'],
530        bundleName: '',
531        moduleName: ''
532      });
533      Text.textOverflow({ overflow: TextOverflow.Ellipsis });
534      Text.fontColor({
535        id: -1,
536        type: 10001,
537        params: ['sys.color.ohos_id_color_text_primary'],
538        bundleName: '',
539        moduleName: ''
540      });
541      Text.textAlign(TextAlign.Start);
542      Text.width('100%');
543      o || Text.pop();
544      ViewStackProcessor.StopGetAccessRecording();
545    }));
546    Text.pop();
547    Row.pop();
548    this.observeComponentCreation(((e, o) => {
549      ViewStackProcessor.StartGetAccessRecordingFor(e);
550      If.create();
551      this.content ? this.ifElseBranchUpdateFunction(0, (() => {
552        this.observeComponentCreation(((e, o) => {
553          ViewStackProcessor.StartGetAccessRecordingFor(e);
554          Row.create();
555          Row.padding({ left: 24, right: 24, top: 8, bottom: 8 });
556          Row.width('100%');
557          o || Row.pop();
558          ViewStackProcessor.StopGetAccessRecording();
559        }));
560        this.observeComponentCreation(((e, o) => {
561          ViewStackProcessor.StartGetAccessRecordingFor(e);
562          Text.create(this.content);
563          Text.fontSize({
564            id: -1,
565            type: 10002,
566            params: ['sys.float.ohos_id_text_size_body2'],
567            bundleName: '',
568            moduleName: ''
569          });
570          Text.fontWeight(FontWeight.Medium);
571          Text.fontColor({
572            id: -1,
573            type: 10001,
574            params: ['sys.color.ohos_id_color_text_primary'],
575            bundleName: '',
576            moduleName: ''
577          });
578          Text.maxLines(CONTENT_MAX_LINES);
579          Text.textOverflow({ overflow: TextOverflow.Ellipsis });
580          Text.minFontSize({
581            id: -1,
582            type: 10002,
583            params: ['sys.float.ohos_id_text_size_body3'],
584            bundleName: '',
585            moduleName: ''
586          });
587          o || Text.pop();
588          ViewStackProcessor.StopGetAccessRecording();
589        }));
590        Text.pop();
591        Row.pop();
592      })) : If.branchId(1);
593      o || If.pop();
594      ViewStackProcessor.StopGetAccessRecording();
595    }));
596    If.pop();
597    this.observeComponentCreation(((e, o) => {
598      ViewStackProcessor.StartGetAccessRecordingFor(e);
599      List.create({ space: 1 });
600      List.width('100%');
601      List.padding({ left: 24, right: 24, top: 8, bottom: 8 });
602      List.clip(!1);
603      o || List.pop();
604      ViewStackProcessor.StopGetAccessRecording();
605    }));
606    this.observeComponentCreation(((e, o) => {
607      ViewStackProcessor.StartGetAccessRecordingFor(e);
608      ForEach.create();
609      this.forEachUpdateFunction(e, this.radioContent, ((e, o) => {
610        const t = e;
611        {
612          const e = !0;
613          const r = (o, t) => {
614            ViewStackProcessor.StartGetAccessRecordingFor(o);
615            ListItem.create(i, e);
616            t || ListItem.pop();
617            ViewStackProcessor.StopGetAccessRecording();
618          };
619          const s = () => {
620            this.observeComponentCreation(r);
621            this.observeComponentCreation(((e, o) => {
622              ViewStackProcessor.StartGetAccessRecordingFor(e);
623              Column.create();
624              o || Column.pop();
625              ViewStackProcessor.StopGetAccessRecording();
626            }));
627            this.observeComponentCreation(((e, o) => {
628              ViewStackProcessor.StartGetAccessRecordingFor(e);
629              Row.create();
630              Row.constraintSize({ minHeight: 48 });
631              Row.clip(!1);
632              Row.onClick((() => {
633                t.action && t.action();
634                this.controller.close();
635              }));
636              o || Row.pop();
637              ViewStackProcessor.StopGetAccessRecording();
638            }));
639            this.observeComponentCreation(((e, o) => {
640              ViewStackProcessor.StartGetAccessRecordingFor(e);
641              Text.create(t.title);
642              Text.fontSize(ITEM_TEXT_SIZE);
643              Text.fontWeight(FontWeight.Regular);
644              Text.maxLines(CONTENT_MAX_LINES);
645              Text.fontColor({
646                id: -1,
647                type: 10001,
648                params: ['sys.color.ohos_id_color_text_primary'],
649                bundleName: '',
650                moduleName: ''
651              });
652              Text.layoutWeight(1);
653              o || Text.pop();
654              ViewStackProcessor.StopGetAccessRecording();
655            }));
656            Text.pop();
657            this.observeComponentCreation(((e, r) => {
658              ViewStackProcessor.StartGetAccessRecordingFor(e);
659              Radio.create({ value: 'item.title', group: 'radioGroup' });
660              Radio.checked(this.selectedIndex === o);
661              Radio.onChange((() => {
662                t.action && t.action();
663                this.controller.close();
664              }));
665              Radio.onClick((() => {
666                t.action && t.action();
667                this.controller.close();
668              }));
669              r || Radio.pop();
670              ViewStackProcessor.StopGetAccessRecording();
671            }));
672            Row.pop();
673            this.observeComponentCreation(((e, t) => {
674              ViewStackProcessor.StartGetAccessRecordingFor(e);
675              If.create();
676              o < this.radioContent.length - 1 ? this.ifElseBranchUpdateFunction(0, (() => {
677                this.observeComponentCreation(((e, o) => {
678                  ViewStackProcessor.StartGetAccessRecordingFor(e);
679                  Divider.create();
680                  Divider.color({
681                    id: -1,
682                    type: 10001,
683                    params: ['sys.color.ohos_id_color_list_separator'],
684                    bundleName: '',
685                    moduleName: ''
686                  });
687                  o || Divider.pop();
688                  ViewStackProcessor.StopGetAccessRecording();
689                }));
690              })) : If.branchId(1);
691              t || If.pop();
692              ViewStackProcessor.StopGetAccessRecording();
693            }));
694            If.pop();
695            Column.pop();
696            ListItem.pop();
697          };
698          const i = (e, s) => {
699            r(e, s);
700            this.updateFuncByElmtId.set(e, r);
701            this.observeComponentCreation(((e, o) => {
702              ViewStackProcessor.StartGetAccessRecordingFor(e);
703              Column.create();
704                o || Column.pop();
705                ViewStackProcessor.StopGetAccessRecording();
706            }));
707            this.observeComponentCreation(((e, o) => {
708              ViewStackProcessor.StartGetAccessRecordingFor(e);
709              Row.create();
710              Row.constraintSize({ minHeight: 48 });
711              Row.clip(!1);
712              Row.onClick((() => {
713                t.action && t.action();
714                this.controller.close();
715              }));
716              o || Row.pop();
717              ViewStackProcessor.StopGetAccessRecording();
718            }));
719            this.observeComponentCreation(((e, o) => {
720              ViewStackProcessor.StartGetAccessRecordingFor(e);
721              Text.create(t.title);
722              Text.fontSize(ITEM_TEXT_SIZE);
723              Text.fontWeight(FontWeight.Regular);
724              Text.maxLines(CONTENT_MAX_LINES);
725              Text.fontColor({
726                id: -1,
727                type: 10001,
728                params: ['sys.color.ohos_id_color_text_primary'],
729                bundleName: '',
730                moduleName: ''
731              });
732              Text.layoutWeight(1);
733              o || Text.pop();
734              ViewStackProcessor.StopGetAccessRecording();
735            }));
736            Text.pop();
737            this.observeComponentCreation(((e, r) => {
738              ViewStackProcessor.StartGetAccessRecordingFor(e);
739              Radio.create({ value: 'item.title', group: 'radioGroup' });
740              Radio.checked(this.selectedIndex === o);
741              Radio.onChange((() => {
742                t.action && t.action();
743                this.controller.close();
744              }));
745              Radio.onClick((() => {
746                t.action && t.action();
747                this.controller.close();
748              }));
749              r || Radio.pop();
750              ViewStackProcessor.StopGetAccessRecording();
751            }));
752            Row.pop();
753            this.observeComponentCreation(((e, t) => {
754              ViewStackProcessor.StartGetAccessRecordingFor(e);
755              If.create();
756              o < this.radioContent.length - 1 ? this.ifElseBranchUpdateFunction(0, (() => {
757                this.observeComponentCreation(((e, o) => {
758                  ViewStackProcessor.StartGetAccessRecordingFor(e);
759                  Divider.create();
760                  Divider.color({
761                    id: -1,
762                    type: 10001,
763                    params: ['sys.color.ohos_id_color_list_separator'],
764                    bundleName: '',
765                    moduleName: ''
766                  });
767                  o || Divider.pop();
768                  ViewStackProcessor.StopGetAccessRecording();
769                }));
770              })) : If.branchId(1);
771              t || If.pop();
772              ViewStackProcessor.StopGetAccessRecording();
773            }));
774            If.pop();
775            Column.pop();
776            ListItem.pop();
777          };
778          e ? (() => {
779            this.observeComponentCreation(r);
780            ListItem.pop();
781          })() : s();
782        }
783      }), void 0, !0, !1);
784      o || ForEach.pop();
785      ViewStackProcessor.StopGetAccessRecording();
786    }));
787    ForEach.pop();
788    List.pop();
789    this.observeComponentCreation(((e, o) => {
790      ViewStackProcessor.StartGetAccessRecordingFor(e);
791      Row.create();
792      Row.width('100%');
793      Row.padding({ left: 16, right: 16, top: 16, bottom: 16 });
794      o || Row.pop();
795      ViewStackProcessor.StopGetAccessRecording();
796    }));
797    this.observeComponentCreation(((e, o) => {
798      ViewStackProcessor.StartGetAccessRecordingFor(e);
799      If.create();
800      this.confirm.value ? this.ifElseBranchUpdateFunction(0, (() => {
801        this.observeComponentCreation(((e, o) => {
802          ViewStackProcessor.StartGetAccessRecordingFor(e);
803          Button.createWithLabel(this.confirm.value);
804          Button.fontSize({
805            id: -1,
806            type: 10002,
807            params: ['sys.float.ohos_id_text_size_button1'],
808            bundleName: '',
809            moduleName: ''
810          });
811          Button.fontWeight(FontWeight.Medium);
812          Button.layoutWeight(1);
813          Button.backgroundColor(this.confirm.background ? this.confirm.background : {
814            id: -1,
815            type: 10001,
816            params: ['sys.color.ohos_id_color_background_transparent'],
817            bundleName: '',
818            moduleName: ''
819          });
820          Button.fontColor(this.confirm.fontColor ? this.confirm.fontColor : {
821            id: -1,
822            type: 10001,
823            params: ['sys.color.ohos_id_color_text_primary_activated'],
824            bundleName: '',
825            moduleName: ''
826          });
827          Button.onClick((() => {
828            this.confirm.action && this.confirm.action();
829            this.controller.close();
830          }));
831          o || Button.pop();
832          ViewStackProcessor.StopGetAccessRecording();
833        }));
834        Button.pop();
835      })) : If.branchId(1);
836      o || If.pop();
837      ViewStackProcessor.StopGetAccessRecording();
838    }));
839    If.pop();
840    Row.pop();
841    Column.pop();
842  }
843
844  rerender() {
845    this.updateDirtyElements();
846  }
847}
848
849export class ConfirmDialog extends ViewPU {
850  constructor(e, o, t, r = -1) {
851    super(e, t, r);
852    this.controller = void 0;
853    this.title = '';
854    this.content = '';
855    this.checkTips = '';
856    this.__isChecked = new ObservedPropertySimplePU(!1, this, 'isChecked');
857    this.primaryButton = { value: '' };
858    this.secondaryButton = { value: '' };
859    this.setInitiallyProvidedValue(o);
860  }
861
862  setInitiallyProvidedValue(e) {
863    void 0 !== e.controller && (this.controller = e.controller);
864    void 0 !== e.title && (this.title = e.title);
865    void 0 !== e.content && (this.content = e.content);
866    void 0 !== e.checkTips && (this.checkTips = e.checkTips);
867    void 0 !== e.isChecked && (this.isChecked = e.isChecked);
868    void 0 !== e.primaryButton && (this.primaryButton = e.primaryButton);
869    void 0 !== e.secondaryButton && (this.secondaryButton = e.secondaryButton);
870  }
871
872  updateStateVars(e) {
873  }
874
875  purgeVariableDependenciesOnElmtId(e) {
876    this.__isChecked.purgeDependencyOnElmtId(e);
877  }
878
879  aboutToBeDeleted() {
880    this.__isChecked.aboutToBeDeleted();
881    SubscriberManager.Get().delete(this.id__());
882    this.aboutToBeDeletedInternal();
883  }
884
885  setController(e) {
886    this.controller = e;
887  }
888
889  get isChecked() {
890    return this.__isChecked.get();
891  }
892
893  set isChecked(e) {
894    this.__isChecked.set(e);
895  }
896
897  initialRender() {
898    this.observeComponentCreation(((e, o) => {
899      ViewStackProcessor.StartGetAccessRecordingFor(e);
900      Column.create();
901      Column.backgroundBlurStyle(BlurStyle.Thick);
902      Column.borderRadius({
903        id: -1,
904        type: 10002,
905        params: ['sys.float.ohos_id_corner_radius_dialog'],
906        bundleName: '',
907        moduleName: ''
908      });
909      Column.margin({
910        left: {
911          id: -1,
912          type: 10002,
913          params: ['sys.float.ohos_id_dialog_margin_start'],
914          bundleName: '',
915          moduleName: ''
916        },
917        right: {
918          id: -1,
919          type: 10002,
920          params: ['sys.float.ohos_id_dialog_margin_end'],
921          bundleName: '',
922          moduleName: ''
923        },
924        bottom: {
925          id: -1,
926          type: 10002,
927          params: ['sys.float.ohos_id_dialog_margin_bottom'],
928          bundleName: '',
929          moduleName: ''
930        }
931      });
932      Column.backgroundColor({
933        id: -1,
934        type: 10001,
935        params: ['sys.color.ohos_id_color_dialog_bg'],
936        bundleName: '',
937        moduleName: ''
938      });
939      o || Column.pop();
940      ViewStackProcessor.StopGetAccessRecording();
941    }));
942    this.observeComponentCreation(((e, o) => {
943      ViewStackProcessor.StartGetAccessRecordingFor(e);
944      Row.create();
945      Row.padding({ left: 24, right: 24, top: 24 });
946      Row.constraintSize({ minHeight: 56 });
947      o || Row.pop();
948      ViewStackProcessor.StopGetAccessRecording();
949    }));
950    this.observeComponentCreation(((e, o) => {
951      ViewStackProcessor.StartGetAccessRecordingFor(e);
952      Text.create(this.title);
953      Text.fontSize({
954        id: -1,
955        type: 10002,
956        params: ['sys.float.ohos_id_text_size_dialog_tittle'],
957        bundleName: '',
958        moduleName: ''
959      });
960      Text.fontWeight(FontWeight.Medium);
961      Text.maxLines(CONTENT_MAX_LINES);
962      Text.minFontSize({
963        id: -1,
964        type: 10002,
965        params: ['sys.float.ohos_id_text_size_sub_title1'],
966        bundleName: '',
967        moduleName: ''
968      });
969      Text.textOverflow({ overflow: TextOverflow.Ellipsis });
970      Text.fontColor({
971        id: -1,
972        type: 10001,
973        params: ['sys.color.ohos_id_color_text_primary'],
974        bundleName: '',
975        moduleName: ''
976      });
977      Text.textAlign(TextAlign.Start);
978      Text.width('100%');
979      o || Text.pop();
980      ViewStackProcessor.StopGetAccessRecording();
981    }));
982    Text.pop();
983    Row.pop();
984    this.observeComponentCreation(((e, o) => {
985      ViewStackProcessor.StartGetAccessRecordingFor(e);
986      If.create();
987      this.content ? this.ifElseBranchUpdateFunction(0, (() => {
988        this.observeComponentCreation(((e, o) => {
989          ViewStackProcessor.StartGetAccessRecordingFor(e);
990          Row.create();
991          Row.padding({ left: 24, right: 24, top: 8, bottom: 8 });
992          Row.width('100%');
993          Row.constraintSize({ minHeight: 36 });
994          o || Row.pop();
995          ViewStackProcessor.StopGetAccessRecording();
996        }));
997        this.observeComponentCreation(((e, o) => {
998          ViewStackProcessor.StartGetAccessRecordingFor(e);
999          Text.create(this.content);
1000          Text.fontSize({
1001            id: -1,
1002            type: 10002,
1003            params: ['sys.float.ohos_id_text_size_body1'],
1004            bundleName: '',
1005            moduleName: ''
1006          });
1007          Text.fontWeight(FontWeight.Medium);
1008          Text.fontColor({
1009            id: -1,
1010            type: 10001,
1011            params: ['sys.color.ohos_id_color_text_primary'],
1012            bundleName: '',
1013            moduleName: ''
1014          });
1015          Text.maxLines(CONTENT_MAX_LINES);
1016          Text.textOverflow({ overflow: TextOverflow.Ellipsis });
1017          Text.minFontSize({
1018            id: -1,
1019            type: 10002,
1020            params: ['sys.float.ohos_id_text_size_body3'],
1021            bundleName: '',
1022            moduleName: ''
1023          });
1024          o || Text.pop();
1025          ViewStackProcessor.StopGetAccessRecording();
1026        }));
1027        Text.pop();
1028        Row.pop();
1029      })) : If.branchId(1);
1030      o || If.pop();
1031      ViewStackProcessor.StopGetAccessRecording();
1032    }));
1033    If.pop();
1034    this.observeComponentCreation(((e, o) => {
1035      ViewStackProcessor.StartGetAccessRecordingFor(e);
1036      Row.create();
1037      Row.height(CHECKBOX_CONTAINER_HEIGHT);
1038      Row.width('100%');
1039      Row.padding({ left: 24, right: 24, top: 8, bottom: 8 });
1040      o || Row.pop();
1041      ViewStackProcessor.StopGetAccessRecording();
1042    }));
1043    this.observeComponentCreation(((e, o) => {
1044      ViewStackProcessor.StartGetAccessRecordingFor(e);
1045      Checkbox.create({ name: 'checkbox', group: 'checkboxGroup' });
1046      Checkbox.select(this.isChecked);
1047      Checkbox.onChange((e => {
1048        this.isChecked = e;
1049      }));
1050      Checkbox.margin({ left: 0, right: 8 });
1051      o || Checkbox.pop();
1052      ViewStackProcessor.StopGetAccessRecording();
1053    }));
1054    Checkbox.pop();
1055    this.observeComponentCreation(((e, o) => {
1056      ViewStackProcessor.StartGetAccessRecordingFor(e);
1057      Text.create(this.checkTips);
1058      Text.fontSize({
1059        id: -1,
1060        type: 10002,
1061        params: ['sys.float.ohos_id_text_size_body2'],
1062        bundleName: '',
1063        moduleName: ''
1064      });
1065      Text.fontWeight(FontWeight.Medium);
1066      Text.fontColor({
1067        id: -1,
1068        type: 10001,
1069        params: ['sys.color.ohos_id_color_text_primary'],
1070        bundleName: '',
1071        moduleName: ''
1072      });
1073      Text.maxLines(CONTENT_MAX_LINES);
1074      Text.layoutWeight(1);
1075      Text.focusOnTouch(!0);
1076      Text.onClick((() => {
1077        this.isChecked = !this.isChecked;
1078      }));
1079      o || Text.pop();
1080      ViewStackProcessor.StopGetAccessRecording();
1081    }));
1082    Text.pop();
1083    Row.pop();
1084    this.observeComponentCreation(((e, o) => {
1085      ViewStackProcessor.StartGetAccessRecordingFor(e);
1086      Row.create();
1087      Row.width('100%');
1088      Row.padding({ left: 16, right: 16, top: 16, bottom: 16 });
1089      o || Row.pop();
1090      ViewStackProcessor.StopGetAccessRecording();
1091    }));
1092    this.observeComponentCreation(((e, o) => {
1093      ViewStackProcessor.StartGetAccessRecordingFor(e);
1094      If.create();
1095      this.primaryButton.value ? this.ifElseBranchUpdateFunction(0, (() => {
1096        this.observeComponentCreation(((e, o) => {
1097          ViewStackProcessor.StartGetAccessRecordingFor(e);
1098          Button.createWithLabel(this.primaryButton.value);
1099          Button.fontSize({
1100            id: -1,
1101            type: 10002,
1102            params: ['sys.float.ohos_id_text_size_button1'],
1103            bundleName: '',
1104            moduleName: ''
1105          });
1106          Button.fontWeight(FontWeight.Medium);
1107          Button.layoutWeight(1);
1108          Button.backgroundColor(this.primaryButton.background ? this.primaryButton.background : {
1109            id: -1,
1110            type: 10001,
1111            params: ['sys.color.ohos_id_color_background_transparent'],
1112            bundleName: '',
1113            moduleName: ''
1114          });
1115          Button.fontColor(this.primaryButton.fontColor ? this.primaryButton.fontColor : {
1116            id: -1,
1117            type: 10001,
1118            params: ['sys.color.ohos_id_color_text_primary_activated'],
1119            bundleName: '',
1120            moduleName: ''
1121          });
1122          Button.onClick((() => {
1123            this.primaryButton.action && this.primaryButton.action();
1124            this.controller.close();
1125          }));
1126          o || Button.pop();
1127          ViewStackProcessor.StopGetAccessRecording();
1128        }));
1129        Button.pop();
1130      })) : If.branchId(1);
1131      o || If.pop();
1132      ViewStackProcessor.StopGetAccessRecording();
1133    }));
1134    If.pop();
1135    this.observeComponentCreation(((e, o) => {
1136      ViewStackProcessor.StartGetAccessRecordingFor(e);
1137      If.create();
1138      this.secondaryButton.value && this.primaryButton.value ? this.ifElseBranchUpdateFunction(0, (() => {
1139        this.observeComponentCreation(((e, o) => {
1140          ViewStackProcessor.StartGetAccessRecordingFor(e);
1141          Column.create();
1142          Column.width(DIVIDER_CONTAINER_WIDTH);
1143          Column.alignItems(HorizontalAlign.Center);
1144          o || Column.pop();
1145          ViewStackProcessor.StopGetAccessRecording();
1146        }));
1147        this.observeComponentCreation(((e, o) => {
1148          ViewStackProcessor.StartGetAccessRecordingFor(e);
1149          If.create();
1150          this.secondaryButton.background ? If.branchId(1) : this.ifElseBranchUpdateFunction(0, (() => {
1151            this.observeComponentCreation(((e, o) => {
1152              ViewStackProcessor.StartGetAccessRecordingFor(e);
1153              Divider.create();
1154              Divider.width(DIVIDER_WIDTH);
1155              Divider.height(DIVIDER_HEIGHT);
1156              Divider.color({
1157                id: -1,
1158                type: 10001,
1159                params: ['sys.color.ohos_id_color_list_separator'],
1160                bundleName: '',
1161                moduleName: ''
1162              });
1163              Divider.vertical(!0);
1164              o || Divider.pop();
1165              ViewStackProcessor.StopGetAccessRecording();
1166            }));
1167          }));
1168          o || If.pop();
1169          ViewStackProcessor.StopGetAccessRecording();
1170        }));
1171        If.pop();
1172        Column.pop();
1173      })) : If.branchId(1);
1174      o || If.pop();
1175      ViewStackProcessor.StopGetAccessRecording();
1176    }));
1177    If.pop();
1178    this.observeComponentCreation(((e, o) => {
1179      ViewStackProcessor.StartGetAccessRecordingFor(e);
1180      If.create();
1181      this.secondaryButton.value ? this.ifElseBranchUpdateFunction(0, (() => {
1182        this.observeComponentCreation(((e, o) => {
1183          ViewStackProcessor.StartGetAccessRecordingFor(e);
1184          Button.createWithLabel(this.secondaryButton.value);
1185          Button.fontSize({
1186            id: -1,
1187            type: 10002,
1188            params: ['sys.float.ohos_id_text_size_button1'],
1189            bundleName: '',
1190            moduleName: ''
1191          });
1192          Button.fontWeight(FontWeight.Medium);
1193          Button.layoutWeight(1);
1194          Button.backgroundColor(this.secondaryButton.background ? this.secondaryButton.background : {
1195            id: -1,
1196            type: 10001,
1197            params: ['sys.color.ohos_id_color_background_transparent'],
1198            bundleName: '',
1199            moduleName: ''
1200          });
1201          Button.fontColor(this.secondaryButton.fontColor ? this.secondaryButton.fontColor : {
1202            id: -1,
1203            type: 10001,
1204            params: ['sys.color.ohos_id_color_text_primary_activated'],
1205            bundleName: '',
1206            moduleName: ''
1207          });
1208          Button.onClick((() => {
1209            this.secondaryButton.action && this.secondaryButton.action();
1210            this.controller.close();
1211          }));
1212          o || Button.pop();
1213          ViewStackProcessor.StopGetAccessRecording();
1214        }));
1215        Button.pop();
1216      })) : If.branchId(1);
1217      o || If.pop();
1218      ViewStackProcessor.StopGetAccessRecording();
1219    }));
1220    If.pop();
1221    Row.pop();
1222    Column.pop();
1223  }
1224
1225  rerender() {
1226    this.updateDirtyElements();
1227  }
1228}
1229
1230export class AlertDialog extends ViewPU {
1231  constructor(e, o, t, r = -1) {
1232    super(e, t, r);
1233    this.controller = void 0;
1234    this.content = '';
1235    this.primaryButton = { value: '' };
1236    this.secondaryButton = { value: '' };
1237    this.setInitiallyProvidedValue(o);
1238  }
1239
1240  setInitiallyProvidedValue(e) {
1241    void 0 !== e.controller && (this.controller = e.controller);
1242    void 0 !== e.content && (this.content = e.content);
1243    void 0 !== e.primaryButton && (this.primaryButton = e.primaryButton);
1244    void 0 !== e.secondaryButton && (this.secondaryButton = e.secondaryButton);
1245  }
1246
1247  updateStateVars(e) {
1248  }
1249
1250  purgeVariableDependenciesOnElmtId(e) {
1251  }
1252
1253  aboutToBeDeleted() {
1254    SubscriberManager.Get().delete(this.id__());
1255    this.aboutToBeDeletedInternal();
1256  }
1257
1258  setController(e) {
1259    this.controller = e;
1260  }
1261
1262  initialRender() {
1263    this.observeComponentCreation(((e, o) => {
1264      ViewStackProcessor.StartGetAccessRecordingFor(e);
1265      Column.create();
1266      Column.backgroundBlurStyle(BlurStyle.Thick);
1267      Column.borderRadius({
1268        id: -1,
1269        type: 10002,
1270        params: ['sys.float.ohos_id_corner_radius_dialog'],
1271        bundleName: '',
1272        moduleName: ''
1273      });
1274      Column.margin({
1275        left: {
1276          id: -1,
1277          type: 10002,
1278          params: ['sys.float.ohos_id_dialog_margin_start'],
1279          bundleName: '',
1280          moduleName: ''
1281        },
1282        right: {
1283          id: -1,
1284          type: 10002,
1285          params: ['sys.float.ohos_id_dialog_margin_end'],
1286          bundleName: '',
1287          moduleName: ''
1288        },
1289        bottom: {
1290          id: -1,
1291          type: 10002,
1292          params: ['sys.float.ohos_id_dialog_margin_bottom'],
1293          bundleName: '',
1294          moduleName: ''
1295        }
1296      });
1297      Column.backgroundColor({
1298        id: -1,
1299        type: 10001,
1300        params: ['sys.color.ohos_id_color_dialog_bg'],
1301        bundleName: '',
1302        moduleName: ''
1303      });
1304      o || Column.pop();
1305      ViewStackProcessor.StopGetAccessRecording();
1306    }));
1307    this.observeComponentCreation(((e, o) => {
1308      ViewStackProcessor.StartGetAccessRecordingFor(e);
1309      Row.create();
1310      Row.padding({ left: 24, right: 24, top: 24 });
1311      o || Row.pop();
1312      ViewStackProcessor.StopGetAccessRecording();
1313    }));
1314    this.observeComponentCreation(((e, o) => {
1315      ViewStackProcessor.StartGetAccessRecordingFor(e);
1316      Text.create(this.content);
1317      Text.fontSize({
1318        id: -1,
1319        type: 10002,
1320        params: ['sys.float.ohos_id_text_size_body1'],
1321        bundleName: '',
1322        moduleName: ''
1323      });
1324      Text.fontWeight(FontWeight.Medium);
1325      Text.fontColor({
1326        id: -1,
1327        type: 10001,
1328        params: ['sys.color.ohos_id_color_text_primary'],
1329        bundleName: '',
1330        moduleName: ''
1331      });
1332      o || Text.pop();
1333      ViewStackProcessor.StopGetAccessRecording();
1334    }));
1335    Text.pop();
1336    Row.pop();
1337    this.observeComponentCreation(((e, o) => {
1338      ViewStackProcessor.StartGetAccessRecordingFor(e);
1339      Row.create();
1340      Row.width('100%');
1341      Row.padding({ left: 16, right: 16, top: 16, bottom: 16 });
1342      o || Row.pop();
1343      ViewStackProcessor.StopGetAccessRecording();
1344    }));
1345    this.observeComponentCreation(((e, o) => {
1346      ViewStackProcessor.StartGetAccessRecordingFor(e);
1347      If.create();
1348      this.primaryButton.value ? this.ifElseBranchUpdateFunction(0, (() => {
1349        this.observeComponentCreation(((e, o) => {
1350          ViewStackProcessor.StartGetAccessRecordingFor(e);
1351          Button.createWithLabel(this.primaryButton.value);
1352          Button.fontSize({
1353            id: -1,
1354            type: 10002,
1355            params: ['sys.float.ohos_id_text_size_button1'],
1356            bundleName: '',
1357            moduleName: ''
1358          });
1359          Button.fontWeight(FontWeight.Medium);
1360          Button.layoutWeight(1);
1361          Button.backgroundColor(this.primaryButton.background ? this.primaryButton.background : {
1362            id: -1,
1363            type: 10001,
1364            params: ['sys.color.ohos_id_color_background_transparent'],
1365            bundleName: '',
1366            moduleName: ''
1367          });
1368          Button.fontColor(this.primaryButton.fontColor ? this.primaryButton.fontColor : {
1369            id: -1,
1370            type: 10001,
1371            params: ['sys.color.ohos_id_color_text_primary_activated'],
1372            bundleName: '',
1373            moduleName: ''
1374          });
1375          Button.onClick((() => {
1376            this.primaryButton.action && this.primaryButton.action();
1377            this.controller.close();
1378          }));
1379          o || Button.pop();
1380          ViewStackProcessor.StopGetAccessRecording();
1381        }));
1382        Button.pop();
1383      })) : If.branchId(1);
1384      o || If.pop();
1385      ViewStackProcessor.StopGetAccessRecording();
1386    }));
1387    If.pop();
1388    this.observeComponentCreation(((e, o) => {
1389      ViewStackProcessor.StartGetAccessRecordingFor(e);
1390      If.create();
1391      this.secondaryButton.value && this.primaryButton.value ? this.ifElseBranchUpdateFunction(0, (() => {
1392        this.observeComponentCreation(((e, o) => {
1393          ViewStackProcessor.StartGetAccessRecordingFor(e);
1394          Column.create();
1395          Column.width(DIVIDER_CONTAINER_WIDTH);
1396          Column.alignItems(HorizontalAlign.Center);
1397          o || Column.pop();
1398          ViewStackProcessor.StopGetAccessRecording();
1399        }));
1400        this.observeComponentCreation(((e, o) => {
1401          ViewStackProcessor.StartGetAccessRecordingFor(e);
1402          If.create();
1403          this.secondaryButton.background ? If.branchId(1) : this.ifElseBranchUpdateFunction(0, (() => {
1404            this.observeComponentCreation(((e, o) => {
1405              ViewStackProcessor.StartGetAccessRecordingFor(e);
1406              Divider.create();
1407              Divider.width(DIVIDER_WIDTH);
1408              Divider.height(DIVIDER_HEIGHT);
1409              Divider.color({
1410                id: -1,
1411                type: 10001,
1412                params: ['sys.color.ohos_id_color_list_separator'],
1413                bundleName: '',
1414                moduleName: ''
1415              });
1416              Divider.vertical(!0);
1417              o || Divider.pop();
1418              ViewStackProcessor.StopGetAccessRecording();
1419            }));
1420          }));
1421          o || If.pop();
1422          ViewStackProcessor.StopGetAccessRecording();
1423        }));
1424        If.pop();
1425        Column.pop();
1426      })) : If.branchId(1);
1427      o || If.pop();
1428      ViewStackProcessor.StopGetAccessRecording();
1429    }));
1430    If.pop();
1431    this.observeComponentCreation(((e, o) => {
1432      ViewStackProcessor.StartGetAccessRecordingFor(e);
1433      If.create();
1434      this.secondaryButton.value ? this.ifElseBranchUpdateFunction(0, (() => {
1435        this.observeComponentCreation(((e, o) => {
1436          ViewStackProcessor.StartGetAccessRecordingFor(e);
1437          Button.createWithLabel(this.secondaryButton.value);
1438          Button.fontSize({
1439            id: -1,
1440            type: 10002,
1441            params: ['sys.float.ohos_id_text_size_button1'],
1442            bundleName: '',
1443            moduleName: ''
1444          });
1445          Button.fontWeight(FontWeight.Medium);
1446          Button.layoutWeight(1);
1447          Button.backgroundColor(this.secondaryButton.background ? this.secondaryButton.background : {
1448            id: -1,
1449            type: 10001,
1450            params: ['sys.color.ohos_id_color_background_transparent'],
1451            bundleName: '',
1452            moduleName: ''
1453          });
1454          Button.fontColor(this.secondaryButton.fontColor ? this.secondaryButton.fontColor : {
1455            id: -1,
1456            type: 10001,
1457            params: ['sys.color.ohos_id_color_text_primary_activated'],
1458            bundleName: '',
1459            moduleName: ''
1460          });
1461          Button.onClick((() => {
1462            this.secondaryButton.action && this.secondaryButton.action();
1463            this.controller.close();
1464          }));
1465          o || Button.pop();
1466          ViewStackProcessor.StopGetAccessRecording();
1467        }));
1468        Button.pop();
1469      })) : If.branchId(1);
1470      o || If.pop();
1471      ViewStackProcessor.StopGetAccessRecording();
1472    }));
1473    If.pop();
1474    Row.pop();
1475    Column.pop();
1476  }
1477
1478  rerender() {
1479    this.updateDirtyElements();
1480  }
1481}
1482
1483export class LoadingDialog extends ViewPU {
1484  constructor(e, o, t, r = -1) {
1485    super(e, t, r);
1486    this.controller = void 0;
1487    this.content = '';
1488    this.setInitiallyProvidedValue(o);
1489  }
1490
1491  setInitiallyProvidedValue(e) {
1492    void 0 !== e.controller && (this.controller = e.controller);
1493    void 0 !== e.content && (this.content = e.content);
1494  }
1495
1496  updateStateVars(e) {
1497  }
1498
1499  purgeVariableDependenciesOnElmtId(e) {
1500  }
1501
1502  aboutToBeDeleted() {
1503    SubscriberManager.Get().delete(this.id__());
1504    this.aboutToBeDeletedInternal();
1505  }
1506
1507  setController(e) {
1508    this.controller = e;
1509  }
1510
1511  initialRender() {
1512    this.observeComponentCreation(((e, o) => {
1513      ViewStackProcessor.StartGetAccessRecordingFor(e);
1514      Column.create();
1515      Column.backgroundBlurStyle(BlurStyle.Thick);
1516      Column.borderRadius({
1517        id: -1,
1518        type: 10002,
1519        params: ['sys.float.ohos_id_corner_radius_dialog'],
1520        bundleName: '',
1521        moduleName: ''
1522      });
1523      Column.margin({
1524        left: {
1525          id: -1,
1526          type: 10002,
1527          params: ['sys.float.ohos_id_dialog_margin_start'],
1528          bundleName: '',
1529          moduleName: ''
1530        },
1531        right: {
1532          id: -1,
1533          type: 10002,
1534          params: ['sys.float.ohos_id_dialog_margin_end'],
1535          bundleName: '',
1536          moduleName: ''
1537        },
1538        bottom: {
1539          id: -1,
1540          type: 10002,
1541          params: ['sys.float.ohos_id_dialog_margin_bottom'],
1542          bundleName: '',
1543          moduleName: ''
1544        }
1545      });
1546      Column.backgroundColor({
1547        id: -1,
1548        type: 10001,
1549        params: ['sys.color.ohos_id_color_dialog_bg'],
1550        bundleName: '',
1551        moduleName: ''
1552      });
1553      o || Column.pop();
1554      ViewStackProcessor.StopGetAccessRecording();
1555    }));
1556    this.observeComponentCreation(((e, o) => {
1557      ViewStackProcessor.StartGetAccessRecordingFor(e);
1558      Row.create();
1559      Row.margin({ left: 24, right: 24, top: 24, bottom: 24 });
1560      Row.constraintSize({ minHeight: 48 });
1561      o || Row.pop();
1562      ViewStackProcessor.StopGetAccessRecording();
1563    }));
1564    this.observeComponentCreation(((e, o) => {
1565      ViewStackProcessor.StartGetAccessRecordingFor(e);
1566      Text.create(this.content);
1567      Text.fontSize({
1568        id: -1,
1569        type: 10002,
1570        params: ['sys.float.ohos_id_text_size_body1'],
1571        bundleName: '',
1572        moduleName: ''
1573      });
1574      Text.fontWeight(FontWeight.Medium);
1575      Text.fontColor({
1576        id: -1,
1577        type: 10001,
1578        params: ['sys.color.ohos_id_color_text_primary'],
1579        bundleName: '',
1580        moduleName: ''
1581      });
1582      Text.layoutWeight(1);
1583      o || Text.pop();
1584      ViewStackProcessor.StopGetAccessRecording();
1585    }));
1586    Text.pop();
1587    this.observeComponentCreation(((e, o) => {
1588      ViewStackProcessor.StartGetAccessRecordingFor(e);
1589      LoadingProgress.create();
1590      LoadingProgress.width(LOADING_PROGRESS_WIDTH);
1591      LoadingProgress.height(LOADING_PROGRESS_HEIGHT);
1592      LoadingProgress.margin({ left: 16 });
1593      o || LoadingProgress.pop();
1594      ViewStackProcessor.StopGetAccessRecording();
1595    }));
1596    Row.pop();
1597    Column.pop();
1598  }
1599
1600  rerender() {
1601    this.updateDirtyElements();
1602  }
1603}
1604export default { TipsDialog, ConfirmDialog, SelectDialog, AlertDialog, LoadingDialog };