import {
  DescriptionCell
} from "./chunk-HINXQTCW.js";
import {
  DateCell
} from "./chunk-25LYVP3C.js";
import {
  TextCell
} from "./chunk-JHIMVLB2.js";

// src/hooks/table/columns/use-product-tag-table-columns.tsx
import { createColumnHelper } from "@tanstack/react-table";
import { useMemo } from "react";
import { useTranslation } from "react-i18next";
import { jsx } from "react/jsx-runtime";
var columnHelper = createColumnHelper();
var useProductTagTableColumns = () => {
  const { t } = useTranslation();
  return useMemo(
    () => [
      columnHelper.accessor("value", {
        header: () => t("fields.value"),
        cell: ({ getValue }) => /* @__PURE__ */ jsx(TextCell, { text: getValue() })
      }),
      columnHelper.accessor("created_at", {
        header: () => t("fields.createdAt"),
        cell: ({ getValue }) => {
          return /* @__PURE__ */ jsx(DateCell, { date: getValue() });
        }
      }),
      columnHelper.accessor("updated_at", {
        header: () => t("fields.updatedAt"),
        cell: ({ getValue }) => {
          return /* @__PURE__ */ jsx(DateCell, { date: getValue() });
        }
      })
    ],
    [t]
  );
};

// src/hooks/table/columns/use-refund-reason-table-columns.tsx
import { useMemo as useMemo2 } from "react";
import { createDataTableColumnHelper } from "@medusajs/ui";
import { useTranslation as useTranslation2 } from "react-i18next";
import { jsx as jsx2 } from "react/jsx-runtime";
var columnHelper2 = createDataTableColumnHelper();
var useRefundReasonTableColumns = () => {
  const { t } = useTranslation2();
  return useMemo2(
    () => [
      columnHelper2.accessor("label", {
        header: () => t("fields.label"),
        enableSorting: true,
        sortLabel: t("fields.label"),
        sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
        sortDescLabel: t("filters.sorting.alphabeticallyDesc")
      }),
      columnHelper2.accessor("code", {
        header: () => t("fields.code"),
        enableSorting: true,
        sortLabel: t("fields.code"),
        sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
        sortDescLabel: t("filters.sorting.alphabeticallyDesc")
      }),
      columnHelper2.accessor("description", {
        header: () => t("fields.description"),
        cell: ({ getValue }) => /* @__PURE__ */ jsx2(DescriptionCell, { description: getValue() }),
        enableSorting: true,
        sortLabel: t("fields.description"),
        sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
        sortDescLabel: t("filters.sorting.alphabeticallyDesc")
      })
    ],
    [t]
  );
};

// src/hooks/table/columns/use-return-reason-table-columns.tsx
import { useMemo as useMemo3 } from "react";
import { Badge } from "@medusajs/ui";
import { createColumnHelper as createColumnHelper2 } from "@tanstack/react-table";
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
var columnHelper3 = createColumnHelper2();
var useReturnReasonTableColumns = () => {
  return useMemo3(
    () => [
      columnHelper3.accessor("value", {
        cell: ({ getValue }) => /* @__PURE__ */ jsx3("div", { className: "py-4", children: /* @__PURE__ */ jsx3(Badge, { className: "h-fit", children: getValue() }) })
      }),
      columnHelper3.accessor("label", {
        cell: ({ row }) => {
          const { label, description } = row.original;
          return /* @__PURE__ */ jsx3("div", { className: "py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col justify-center", children: [
            /* @__PURE__ */ jsx3("span", { className: "truncate font-medium", children: label }),
            /* @__PURE__ */ jsx3("span", { className: "truncate", children: description ? description : "-" })
          ] }) });
        }
      })
    ],
    []
  );
};

export {
  useProductTagTableColumns,
  useRefundReasonTableColumns,
  useReturnReasonTableColumns
};
