import { useQuery } from '@tanstack/react-query';
import { apiFetch } from '../lib/api';
import type { Settings } from '../lib/types';

export function useSettings() {
  return useQuery({
    queryKey: ['settings'],
    queryFn: () => apiFetch<Settings>('/settings'),
    // Settings endpoint added in Phase 3 — fail gracefully.
    retry: false,
  });
}
