import { useMemo as i } from "react";
import { useModuleDictionary as s } from "@m4l/core";
import { DICTIONARY as t } from "../dictionary.js";
import { useDetailFormatter as a } from "./useDetailFormatter.js";
import { useColumnIcon as c } from "../../datagrids/formatters/ColumnIconFormatter/useColumnIcon.js";
import { useColumnDate as u } from "../../datagrids/formatters/ColumnDateFormatter/useColumnDate.js";
const _ = (o) => {
  const { getLabel: e } = s(), m = u({
    presentationType: "datetime",
    fieldValue: "createdAt"
  }), n = a(o), r = c(
    {
      getIconProps: n
    }
  );
  return i(
    () => [
      {
        key: "createdAt",
        name: e(t.LABEL_CREATED_AT),
        type: "date",
        width: 300,
        ...m
      },
      {
        key: o === "m4l" ? "email" : "userId",
        name: e(t.LABEL_USER),
        type: "string",
        width: 300
      },
      {
        key: o === "m4l" ? "resourceName" : "serviceId",
        name: e(o === "m4l" ? t.LABEL_RESOURCE_NAME : t.LABEL_SERVICE_ID),
        type: "string",
        width: 120
      },
      {
        key: "logPreview",
        name: e(t.LABEL_LOG_PREVIEW),
        type: "string",
        width: 250
      },
      {
        key: "detail",
        name: e(t.LABEL_LOG_DETAIL),
        type: "custom",
        ...r
      },
      {
        key: "ip",
        name: e(t.LABEL_IP),
        type: "string",
        width: 120
      }
    ],
    [e, m, o, r]
  );
};
export {
  _ as useObjectLogsColumns
};
