import { ProductType as CwProductType } from "../../generated/prisma/client";
import { CatalogItemType as ApiCatalogItemType } from "../../../api/generated/prisma/client";
import { Translation } from "./types";

export const catalogItemTypeTranslation: Translation<
  CwProductType,
  ApiCatalogItemType
> = {
  values: [
    { from: "typeRecId", to: "id" },
    {
      from: "description",
      to: "name",
      process: (value) => (value ? value : "Unknown Type"),
    },
    { from: "description", to: "description" },
    { from: "inactiveFlag", to: "inactiveFlag" },
    { from: "defaultFlag", to: "defaultFlag" },
    { from: "updatedBy", to: "updatedById" },
    { from: "enteredBy", to: "createdById" },
    { from: "lastUpdatedUtc", to: "updatedAt" },
    { from: "dateEnteredUtc", to: "createdAt" },
  ],
};
