"use server";

import {
  updateCategory as updateCategoryData,
  // deleteCategoryById as deleteCategoryByIdData,
  // deleteCategoryMultipleId as deleteCategoryMultipleIdData,
  updateTag as updateTagData,
  createTag,
  // getPostCategories,
  // searchCategories as searchCategoriesData,
  // getTags as getTagsPost,
  // searchTags as searchTagsData,
  // deleteTag,
  // deleteMultipleTag as deleteMultipleTagData,
  createCategory,
  // getChildrenCategoryMultipleId,
  // getChildrenCategory,
} from "@/models/term";

export const addCategory = async (data) => {
  return await createCategory(data);
};

export const updateCategory = async (data) => {
  return await updateCategoryData(data);
};

// export const getCategories = async () => {
//   return await getPostCategories();
// };

// export const searchCategories = async (keyword) => {
//   return await searchCategoriesData(keyword);
// };

// export const deleteCategoryById = async (id) => {
//   return await deleteCategoryByIdData(id);
// };

// export const deleteCategoryMultipleId = async (ids) => {
//   return await deleteCategoryMultipleIdData(ids);
// };

// export const getChildMultipleId = async (ids) => {
//   return await getChildrenCategoryMultipleId(ids);
// };

// export const getChildrenById = async (id) => {
//   return await getChildrenCategory(id);
// };

// export const getTags = async () => {
//   return await getTagsPost();
// };

export const addTag = async (tagData) => {
  return await createTag(tagData);
};

export const updateTag = async (data) => {
  return await updateTagData(data);
};

// export const searchTags = async (keyword) => {
//   return await searchTagsData(keyword);
// };

// export const deleteTagById = async (id) => {
//   return await deleteTag(id);
// };

// export const deleteMultipleTag = async (ids) => {
//   return await deleteMultipleTagData(ids);
// };
