import 'package:mobile_use_statistics/src/event/event.dart';

import 'mobile_use_statistics_platform_interface.dart';

class MobileUseStatistics {
  static Future<List<Event>?> getLockScreenStatistics({
    required int startTime,
    required int endTime,
  }) {
    return MobileUseStatisticsPlatform.instance.getLockScreenStatistics(
      startTime: startTime,
      endTime: endTime,
    );
  }

  static Future<bool> hasUseStatisticsPermission() {
    return MobileUseStatisticsPlatform.instance.hasUseStatisticsPermission();
  }

  static Future<bool> requestUseStatisticsPermission() {
    return MobileUseStatisticsPlatform.instance
        .requestUseStatisticsPermission();
  }

  ///app启动开启
  static Future<void>appLaunchAnActivation() async {
    return MobileUseStatisticsPlatform.instance.appLaunchAnActivationPermission();
  }

  ///app进入后台
  static Future<void>appEntersTheBacken() async {
    return MobileUseStatisticsPlatform.instance.appEntersTheBacken();
  }
}
