import httpClient from "@/services/httpClient";
import type { Response } from "@/types/response.types";
import * as urlHelper from "@/libs/url.lib"
import type { HotKeyword } from "@/types/searchHistory.types";

const _url = urlHelper.withPrefix("/gw/user/searchHistory");

export async function getHoyKeyword(size: number): Promise<HotKeyword[]> {
  const resp = await httpClient.get<Response<HotKeyword[]>>(_url(`/getHotKeyword?size=${size}`))
  return resp.data.data
}
