100aff185Sopenharmony_ci/* 200aff185Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 300aff185Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 400aff185Sopenharmony_ci * you may not use this file except in compliance with the License. 500aff185Sopenharmony_ci * You may obtain a copy of the License at 600aff185Sopenharmony_ci * 700aff185Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 800aff185Sopenharmony_ci * 900aff185Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1000aff185Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1100aff185Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1200aff185Sopenharmony_ci * See the License for the specific language governing permissions and 1300aff185Sopenharmony_ci * limitations under the License. 1400aff185Sopenharmony_ci */ 1500aff185Sopenharmony_ciimport { Constants } from '../model/common/Constants'; 1600aff185Sopenharmony_ci 1700aff185Sopenharmony_ci@Component 1800aff185Sopenharmony_ciexport struct DetailsDialogComponent { 1900aff185Sopenharmony_ci title?: Resource; 2000aff185Sopenharmony_ci content: string | Resource = ''; 2100aff185Sopenharmony_ci colon: string = ': '; 2200aff185Sopenharmony_ci isLast: boolean = false; 2300aff185Sopenharmony_ci keyForAutoTest: string = ''; 2400aff185Sopenharmony_ci 2500aff185Sopenharmony_ci build() { 2600aff185Sopenharmony_ci Row() { 2700aff185Sopenharmony_ci Text(this.title) 2800aff185Sopenharmony_ci .key('KeyOf' + this.keyForAutoTest) 2900aff185Sopenharmony_ci .fontSize($r('sys.float.ohos_id_text_size_body2')) 3000aff185Sopenharmony_ci .fontFamily($r('app.string.id_text_font_family_regular')) 3100aff185Sopenharmony_ci .fontColor($r('sys.color.ohos_id_color_text_primary')) 3200aff185Sopenharmony_ci 3300aff185Sopenharmony_ci Text(this.colon) 3400aff185Sopenharmony_ci .fontSize($r('sys.float.ohos_id_text_size_body2')) 3500aff185Sopenharmony_ci .fontFamily($r('app.string.id_text_font_family_regular')) 3600aff185Sopenharmony_ci .fontColor($r('sys.color.ohos_id_color_text_primary')) 3700aff185Sopenharmony_ci 3800aff185Sopenharmony_ci Text(this.content) 3900aff185Sopenharmony_ci .key('ValueOf' + this.keyForAutoTest) 4000aff185Sopenharmony_ci .fontSize($r('sys.float.ohos_id_text_size_body2')) 4100aff185Sopenharmony_ci .fontFamily($r('app.string.id_text_font_family_regular')) 4200aff185Sopenharmony_ci .fontColor($r('sys.color.ohos_id_color_text_secondary')) 4300aff185Sopenharmony_ci .margin({ 4400aff185Sopenharmony_ci right: $r('app.float.details_dialog_text_margin_right') 4500aff185Sopenharmony_ci }) 4600aff185Sopenharmony_ci } 4700aff185Sopenharmony_ci .width('100%') 4800aff185Sopenharmony_ci .margin({ 4900aff185Sopenharmony_ci bottom: this.isLast ? $r('sys.float.ohos_id_elements_margin_vertical_l') : $r('sys.float.ohos_id_text_paragraph_margin_s') 5000aff185Sopenharmony_ci }) 5100aff185Sopenharmony_ci .alignItems(VerticalAlign.Top) 5200aff185Sopenharmony_ci } 5300aff185Sopenharmony_ci}