import { SoType as CwOpportunityType } from "../../generated/prisma/client";
import { OpportunityType as ApiOpportunityType } from "../../../api/generated/prisma/client";
import { Translation } from "./types";

export const opportunityTypeTranslation: Translation<
  CwOpportunityType,
  ApiOpportunityType
> = {
  values: [
    { from: "soTypeRecId", to: "id" },
    {
      from: "description",
      to: "name",
      process: (value) => (value ? value : "Unknown Type"),
    },
    { from: "description", to: "description" },
    { from: "inactiveFlag", to: "inactiveFlag" },
    { from: "dateEnteredUtc", to: "createdAt" },
    { from: "updatedBy", to: "updatedById" },
    { from: "lastUpdatedUtc", to: "updatedAt" },
  ],
};
