import InventoryOutlinedIcon from "@mui/icons-material/InventoryOutlined";

import { ArticleDetail } from "../../extensions/catalog";
import { ContribComponentMap } from "../../types";

export const contrib: Record<string, ContribComponentMap> = {
  catalog: {
    "catalog:article:detail:inventory": {
      title: "Inventory",
      icon: InventoryOutlinedIcon,
      component: async () => (await import("./contrib/ArticleInventory")).default,
      predicate: (article: ArticleDetail) => article.item_type == "SKU",
      variant: "inline",
      permission: "inventory.view_inventorytransaction",
    },
  },
} as const;
