import { ProductCategory as CwProductCategory } from "../../generated/prisma/client";
import { CatalogCategory as ApiCatalogCategory } from "../../../api/generated/prisma/client";
import { Translation } from "./types";

export const catalogCategoryTranslation: Translation<
  CwProductCategory,
  ApiCatalogCategory
> = {
  values: [
    { from: "categoryRecId", to: "id" },
    {
      from: "description",
      to: "name",
      process: (value) => (value ? value : "Unknown Category"),
    },
    { from: "description", to: "description" },
    { from: "inactiveFlag", to: "inactiveFlag" },
    { from: "updatedBy", to: "updatedById" },
    { from: "enteredBy", to: "createdById" },
    { from: "lastUpdatedUtc", to: "updatedAt" },
    { from: "dateEnteredUtc", to: "createdAt" },
  ],
};
