/**
 * Health Check Hook
 */

'use client'

import { useQuery } from '@tanstack/react-query'
import { apiClient } from '@/lib/api-client'

/**
 * 系統健康狀態
 */
export function useHealth() {
  return useQuery({
    queryKey: ['health'],
    queryFn: () => apiClient.getHealth(),
    refetchInterval: 30000, // 30 秒輪詢
    retry: 3,
  })
}
