import 'package:absenkuv3/Repository/Model/MonitorAbsen/mBadgeMonitorAbsen.dart';
import 'package:absenkuv3/Repository/Service/serviceInfo.dart';
import 'package:absenkuv3/Setting/Header.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';

class BadgeMonitorAbsenApi {
  Dio dio = ServerInfo().getConnection();
  Future<BadgeMonitorAbsen> badgeMonitorAbsen() async {
    debugPrint('masuk badge per column');
    var respon = await dio.get("dashboard-absensi/badge",
        options: Options(headers: await Header().getHeader()));
    debugPrint('badge' + respon.data);
    if (respon.statusCode == 200) {
      return badgeMonitorAbsenFromJson(respon.data);
    } else {
      return BadgeMonitorAbsen(success: false);
    }
  }
}
