import '../models/bo/alert_dashboard_bo.dart';
import '../repositories/alert_dashboard_repository.dart';

class AlertDashboardService {
  final AlertDashboardRepository _repository;

  AlertDashboardService({required AlertDashboardRepository repository})
      : _repository = repository;

  Future<AlertDashboardBO> getDashboard() async {
    final result = await _repository.getDashboard();
    if (result.success && result.data != null) {
      return result.data!;
    }
    throw Exception(result.msg);
  }
}