import { request } from '@/api/request'

export const fetchNetworkScreenOverview = () => request.get('/DC-Control/v1/network-screen/overview')

export const fetchNetworkScreenHealthMatrix = (params?: { window?: string }) =>
  request.get('/DC-Control/v1/network-screen/health-matrix', { params })

export const fetchNetworkScreenFreshnessDistribution = () => request.get('/DC-Control/v1/network-screen/freshness-distribution')

export const fetchNetworkScreenProtocolDistribution = () => request.get('/DC-Control/v1/network-screen/protocol-distribution')

export const fetchNetworkScreenResourceOverview = (params?: { window?: string }) =>
  request.get('/DC-Control/v1/network-screen/resource-overview', { params })

export const fetchNetworkScreenAlertsStream = (params?: { limit?: number; window?: string }) =>
  request.get('/DC-Control/v1/network-screen/alerts-stream', { params })

export const fetchNetworkScreenDevices = (params?: {
  page?: number
  size?: number
  keyword?: string
  status?: string
  enabled?: boolean
  protocol?: string
  vendor?: string
}) => request.get('/DC-Control/v1/network-screen/devices', { params })
