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

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

export async function generate(projectName: string, keywords: string, chapterTitle: string) {
  const params = { projectName, keywords, chapterTitle }
  const resp = await httpClient.post<Response<string>>(_url("ai/generate"), params);
  return resp.data.data;
}
