const baseURL = import.meta.env.VITE_API_BASE_URL;

const post = {
  search: `${baseURL}/Post/Search`,
  createOrUpdate: `${baseURL}/Post/CreateOrUpdate`,
  getById: `${baseURL}/Post/GetById?id=`,
  delete: `${baseURL}/Post/Delete?id=`,
  publish: `${baseURL}/Post/Publish`,
  callPostAi: `${baseURL}/Ai/CallPostAi?id=`,
};

const tag = {
  autocomplete: `${baseURL}/Tag/Autocomplete`,
  search: `${baseURL}/Tag/Search`,
};

const product = {
  search: `${baseURL}/Product/Search`,
  createOrUpdate: `${baseURL}/Product/CreateOrUpdate`,
  getById: `${baseURL}/Product/GetById?id=`,
  delete: `${baseURL}/Product/Delete?id=`,
};

const topic = {
  search: `${baseURL}/Topic/Search`,
  createOrUpdate: `${baseURL}/Topic/CreateOrUpdate`,
  getById: `${baseURL}/Topic/GetById?id=`,
  delete: `${baseURL}/Topic/Delete?id=`,
};

const scriptConfig = {
  search: `${baseURL}/ScriptConfig/Search`,
  createOrUpdate: `${baseURL}/ScriptConfig/CreateOrUpdate`,
  getById: `${baseURL}/ScriptConfig/GetById?id=`,
  delete: `${baseURL}/ScriptConfig/Delete?id=`,
};

export { post, tag, product, topic, scriptConfig };
