import 'package:flyinsono/architecture/services/modules/default_entry_configuration.dart';
import 'package:flyinsono/architecture/services/modules/hardware_setting_configuration.dart';
import 'package:flyinsono/architecture/services/notification/local_notification_service.dart';
import 'package:flyinsono/architecture/services/modules/area_region.dart';
import 'package:flyinsono/architecture/services/modules/examine_configurations.dart';
import 'package:flyinsono/architecture/services/modules/config_language.dart';
import 'package:flyinsono/architecture/services/modules/local_setting_configurations.dart';
import 'package:flyinsono/architecture/services/modules/configurations_form.dart';
import 'package:flyinsono/architecture/services/modules/patient_configurations.dart';
import 'package:flyinsono/architecture/services/modules/report_editor_configuration.dart';
import 'package:fis_ui/index.dart';
import 'package:flyinsono/architecture/services/notification/mobile_schedule_notification_service.dart';
import 'package:flyinsono/views/wechat_mini_program/wx_env/index.dart';
import 'package:get/get.dart';

import 'setup.dart';

///初始化服务
Future<void> initServices() async {
  ServiceSetup().build(
    builder: () async {
      // 全局
      Get.put(LanguageService());
      Get.lazyPut(() => AreaRegionService());
      Get.lazyPut(() => CheckService());
      Get.lazyPut(() => PatientCheckService());
      Get.lazyPut(() => ConfigurationFormService());
      Get.lazyPut(() => LocalSettingService());
      Get.lazyPut(() => LocalReportEditorService());
      Get.lazyPut(() => HardwareSettingService());
      Get.lazyPut(() => DefaultEntryService());
      if (kIsMobile && !kIsWechat) {
        Get.put(LocalNotificationService());
        Get.lazyPut(() => MobileScheduleNotificationService());
      }
    },
    webBuilder: () async {
      // 纯Web
    },
    shellBuilder: () async {
      // 套壳Web - Win
    },
    nativeBuilder: () async {
      // 原生 - iOS/Android
    },
  );
}
