import api from './api';
import type { SearchResponse } from '../types';

export const searchService = {
  // GET /api/search?q=  — Typesense-backed search over tracks (title, artist).
  async search(q: string): Promise<SearchResponse> {
    const res = await api.get<SearchResponse>('/search', { params: { q } });
    return res.data;
  },
};
