import { useMutation } from '@tanstack/react-query';
import { searchDocs } from '@/api/docs';

export function useDocsSearch() {
  return useMutation({
    mutationFn: (params: { query: string; mode?: string; topK?: number; docType?: string }) =>
      searchDocs(params.query, params.mode, params.topK, params.docType),
  });
}
