class ApiConfig {
  // Untuk development di emulator Android
  static const String baseUrl = 'http://bumiputera.oyi.web.id';
  
  // Mobile Auth endpoints
  static const String login = '$baseUrl/api/mobile/auth/login';
  static const String logout = '$baseUrl/api/mobile/auth/logout';
  static const String refresh = '$baseUrl/api/mobile/auth/refresh';
  static const String profile = '$baseUrl/api/mobile/auth/profile';
  static const String changePassword = '$baseUrl/api/mobile/auth/update-password';

  // Cuti endpoints
  static const String cuti = '$baseUrl/api/mobile/cuti';
  static const String cutiCreate = '$baseUrl/api/mobile/cuti/create';
  static const String cutiStore = '$baseUrl/api/mobile/cuti/store';
  
  // Presensi endpoints
  static const String absensi = '$baseUrl/api/mobile/absensi';
  static const String savePresensi = '$baseUrl/api/mobile/presensi/save';
  static const String checkAbsensi = '$baseUrl/api/mobile/presensi/cek_absen_hari_ini';
  static const String dashboardStats = '$baseUrl/api/mobile/dashboard/stats';
  static const String presensiStats = '$baseUrl/api/mobile/presensi/stats';
  
  // Konfigurasi untuk radius presensi
  static const double defaultOfficeLatitude = -8.1575835; // Koordinat kantor
  static const double defaultOfficeLongitude = 113.7229374; // Koordinat kantor
  static const double defaultRadiusInMeters = 200.0; // Radius 1200 meter
  
  // Key untuk SharedPreferences
  static const String officeLatitudeKey = 'office_latitude';
  static const String officeLongitudeKey = 'office_longitude';
  static const String radiusInMetersKey = 'radius_in_meters';
  
  static Map<String, String> baseHeaders = {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
  };

  static Map<String, String> authHeaders(String? token) {
    return {
      ...baseHeaders,
      if (token != null) 'Authorization': 'Bearer $token',
    };
  }
} 