import i18n from "i18next";

const AuditTrailMapping = {
  admin_job_remove_from_ar: (status) => i18n.t("audit_trail.messages.admin_job_remove_from_ar", { status }),
  admin_jobfieldchange: (field, value) => "ADMIN: " + i18n.t("audit_trail.messages.jobfieldchanged", { field, value }),
  admin_jobstatuschange: (status) => "ADMIN: " + i18n.t("audit_trail.messages.jobstatuschange", { status }),
  alertToggle: (status) => i18n.t("audit_trail.messages.alerttoggle", { status }),
  appointmentcancel: (lost_sale_reason) => i18n.t("audit_trail.messages.appointmentcancel", { lost_sale_reason }),
  appointmentinsert: (start) => i18n.t("audit_trail.messages.appointmentinsert", { start }),
  billdeleted: (invoice_number) => i18n.t("audit_trail.messages.billdeleted", { invoice_number }),
  billmarkforreexport: (invoice_number) => i18n.t("audit_trail.messages.billmarkforreexport", { invoice_number }),
  billposted: (invoice_number) => i18n.t("audit_trail.messages.billposted", { invoice_number }),
  billupdated: (invoice_number, details) => i18n.t("audit_trail.messages.billupdated", { invoice_number, details }),
  jobassignmentchange: (operation, name) => i18n.t("audit_trail.messages.jobassignmentchange", { operation, name }),
  jobassignmentremoved: (operation) => i18n.t("audit_trail.messages.jobassignmentremoved", { operation }),
  jobchecklist: (type, inproduction, status) =>
    i18n.t("audit_trail.messages.jobchecklist", { type, inproduction, status }),
  jobconverted: (ro_number) => i18n.t("audit_trail.messages.jobconverted", { ro_number }),
  jobintake: (status, scheduled_completion) =>
    i18n.t("audit_trail.messages.jobintake", { status, scheduled_completion }),
  jobdelivery: (status, email, actual_completion) =>
    i18n.t("audit_trail.messages.jobdelivery", { status, email, actual_completion }),
  jobexported: () => i18n.t("audit_trail.messages.jobexported"),
  jobfieldchange: (field, value) => i18n.t("audit_trail.messages.jobfieldchanged", { field, value }),
  jobimported: () => i18n.t("audit_trail.messages.jobimported"),
  jobinproductionchange: (inproduction) => i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
  jobinvoiced: () => i18n.t("audit_trail.messages.jobinvoiced"),
  jobclosedwithbypass: () => i18n.t("audit_trail.messages.jobclosedwithbypass"),
  joblineupdate: (lineDescription, details) =>
    i18n.t("audit_trail.messages.joblineupdate", { details, lineDescription }),
  jobmanualcreate: () => i18n.t("audit_trail.messages.jobmanualcreate"),
  jobmanuallineinsert: (details) => i18n.t("audit_trail.messages.jobmanuallineinsert", { details }),
  jobmodifylbradj: ({ mod_lbr_ty, hours }) => i18n.t("audit_trail.messages.jobmodifylbradj", { mod_lbr_ty, hours }),
  jobnoteadded: () => i18n.t("audit_trail.messages.jobnoteadded"),
  jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
  jobnotedeleted: () => i18n.t("audit_trail.messages.jobnotedeleted"),
  admin_jobunvoid: () => i18n.t("audit_trail.messages.admin_jobunvoid"),
  admin_jobuninvoice: () => i18n.t("audit_trail.messages.admin_jobuninvoice"),
  admin_jobmarkforreexport: () => i18n.t("audit_trail.messages.admin_jobmarkforreexport"),
  admin_jobmarkexported: () => i18n.t("audit_trail.messages.admin_jobmarkexported"),
  failedpayment: () => i18n.t("audit_trail.messages.failedpayment"),
  assignedlinehours: (team, hours) => i18n.t("audit_trail.messages.assignedlinehours", { team, hours }),
  jobspartsorder: (order_number) => i18n.t("audit_trail.messages.jobspartsorder", { order_number }),
  jobspartsreturn: (order_number) => i18n.t("audit_trail.messages.jobspartsreturn", { order_number }),
  jobstatuschange: (status) => i18n.t("audit_trail.messages.jobstatuschange", { status }),
  jobsupplement: () => i18n.t("audit_trail.messages.jobsupplement"),
  jobsuspend: (status) => i18n.t("audit_trail.messages.jobsuspend", { status }),
  jobvoid: () => i18n.t("audit_trail.messages.jobvoid"),
  // Tasks Entries
  tasksCreated: (title, createdBy) =>
    i18n.t("audit_trail.messages.tasks_created", {
      title,
      createdBy
    }),
  tasksUpdated: (title, updatedBy) =>
    i18n.t("audit_trail.messages.tasks_updated", {
      title,
      updatedBy
    }),
  tasksDeleted: (title, deletedBy) =>
    i18n.t("audit_trail.messages.tasks_deleted", {
      title,
      deletedBy
    }),
  tasksUndeleted: (title, undeletedBy) =>
    i18n.t("audit_trail.messages.tasks_undeleted", {
      title,
      undeletedBy
    }),
  tasksCompleted: (title, completedBy) =>
    i18n.t("audit_trail.messages.tasks_completed", {
      title,
      completedBy
    }),
  tasksUncompleted: (title, uncompletedBy) =>
    i18n.t("audit_trail.messages.tasks_uncompleted", {
      title,
      uncompletedBy
    }),
  timeticketcreated: (employee, date, details) =>
    i18n.t("audit_trail.messages.timeticketcreated", { employee, date, details }),
  timeticketupdated: (employee, date, details) =>
    i18n.t("audit_trail.messages.timeticketupdated", { employee, date, details })
};

export default AuditTrailMapping;
