import { apiApp } from '@/api/autoshopee/api';

export const apiCollectionCreate = async (payload) => {
  return apiApp.post('/extension/shopee/ads/keyword/create', payload);
};

export const apiCollectionList = async () => {
  return apiApp.get('/extension/shopee/ads/keyword/list');
};

export const apiCollectionRemove = async (id) => {
  return apiApp.post(`/extension/shopee/ads/keyword/remove/${id}`);
};

export const apiCollectionUpdate = async (id, payload) => {
  return apiApp.post(`/extension/shopee/ads/keyword/update/${id}`, payload);
};

export const apiKeywordList = async (collectionId) => {
  return apiApp.get(`/extension/shopee/ads/keyword/item/list/${collectionId}`);
};

export const apiKeywordAdd = async (collectionId, payload) => {
  return apiApp.post(`/extension/shopee/ads/keyword/item/add/${collectionId}`, payload);
};

export const apiKeywordRemove = async (id) => {
  return apiApp.post(`/extension/shopee/ads/keyword/item/remove/${id}`);
};

export const apiKeywordUpdate = async (id, payload) => {
  return apiApp.post(`/extension/shopee/ads/keyword/item/update/${id}`, payload);
};
