1e75ebbc8Sopenharmony_ci/*
2e75ebbc8Sopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3e75ebbc8Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4e75ebbc8Sopenharmony_ci * you may not use this file except in compliance with the License.
5e75ebbc8Sopenharmony_ci * You may obtain a copy of the License at
6e75ebbc8Sopenharmony_ci *
7e75ebbc8Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8e75ebbc8Sopenharmony_ci *
9e75ebbc8Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10e75ebbc8Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11e75ebbc8Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12e75ebbc8Sopenharmony_ci * See the License for the specific language governing permissions and
13e75ebbc8Sopenharmony_ci * limitations under the License.
14e75ebbc8Sopenharmony_ci */
15e75ebbc8Sopenharmony_ci
16e75ebbc8Sopenharmony_ciimport CommonStyleManager from './CommonStyleManager';
17e75ebbc8Sopenharmony_ciimport deviceInfo from '@ohos.deviceInfo';
18e75ebbc8Sopenharmony_ci
19e75ebbc8Sopenharmony_ciconst TAG = 'Common-StyleConfiguration';
20e75ebbc8Sopenharmony_ciconst deviceTypeInfo = deviceInfo.deviceType;
21e75ebbc8Sopenharmony_ci
22e75ebbc8Sopenharmony_ciexport class CommonStyle {
23e75ebbc8Sopenharmony_ci  statusBarFontSize: Length = deviceTypeInfo === 'phone' ? '12fp' : '16fp';
24e75ebbc8Sopenharmony_ci  statusBarIconWidth: Length = '24vp';
25e75ebbc8Sopenharmony_ci  statusBarIconHeight: Length = '24vp';
26e75ebbc8Sopenharmony_ci  statusBarMarginLeftRight: Length = deviceTypeInfo === 'phone' ? '0vp' : $r("app.float.status_bar_margin_left_right");
27e75ebbc8Sopenharmony_ci  deviceTypeInfo = deviceTypeInfo;
28e75ebbc8Sopenharmony_ci}
29e75ebbc8Sopenharmony_ci
30e75ebbc8Sopenharmony_ciexport default class StyleConfiguration {
31e75ebbc8Sopenharmony_ci  static getCommonStyle(): CommonStyle {
32e75ebbc8Sopenharmony_ci    const key: string = TAG + '-Common';
33e75ebbc8Sopenharmony_ci    return CommonStyleManager.getStyle(key, CommonStyle);
34e75ebbc8Sopenharmony_ci  }
35e75ebbc8Sopenharmony_ci}