1/*
2 * Copyright (c) 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 * 安装流程框构造者
18 *
19 * @since 2022-06-05
20 */
21@CustomDialog
22export struct MessageDialogBuilder {
23  /**
24   * 内容
25   */
26  message: ResourceStr;
27
28  /**
29   * 控制器
30   */
31  controller: CustomDialogController;
32
33  build() {
34    Column() {
35      Row() {
36        LoadingProgress()
37          .width($r('app.float.message_dialog_loading_progress_width'))
38          .height($r('app.float.message_dialog_loading_progress_height'))
39          .color(Color.Gray)
40        Text(this.message)
41          .width('100%')
42          .fontSize($r('app.float.text_size_dialog_body'))
43          .padding({ left: $r('app.float.message_dialog_text_padding_left') })
44      }
45    }
46    .margin({
47      left: $r('app.float.dialog_margin_horizontal'),
48      right: $r('app.float.dialog_margin_horizontal'),
49      top: $r('app.float.message_dialog_margin_vertical'),
50      bottom: $r('app.float.message_dialog_margin_vertical')
51    })
52  }
53}