"use client";
import { jsxs as i, jsx as t } from "react/jsx-runtime";
import { useRef as d, Suspense as p } from "react";
import { FiLock as g, FiGrid as x } from "../../../../../../node_modules/.pnpm/react-icons@5.5.0_react@19.0.0/node_modules/react-icons/fi/index.js";
import { LicenseManager as n } from "../../../licensing/index.js";
import { classNames as s } from "../../../utils/index.js";
import { useDrag as f } from "../../../../../../node_modules/.pnpm/react-dnd@16.0.1_@types_node@22.13.4_@types_react@19.0.10_react@19.0.0/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js";
const D = ({ block: e }) => {
  const o = n.isBlockPremium(e.type), r = n.canUseBlock(e.type), [{ opacity: l }, c] = f(
    () => ({
      type: e.type,
      item: {
        type: e.type,
        settings: e.settings,
        advancedSettings: e.advancedSettings
      },
      canDrag: r,
      // Disable dragging for premium blocks if not licensed
      collect: (m) => ({
        opacity: m.isDragging() ? 0.5 : 1
      })
    }),
    [r]
  ), a = d(null);
  return r && c(a), /* @__PURE__ */ i(
    "div",
    {
      ref: a,
      style: { opacity: l },
      className: s(
        "relative flex h-[88px] flex-col items-center overflow-hidden rounded-sm bg-slate-50 py-4 text-slate-800 ring-1 ring-slate-300 transition-colors duration-300",
        r ? "cursor-move hover:border-slate-600 hover:bg-slate-100 hover:text-slate-800 hover:ring-slate-600" : "cursor-not-allowed !opacity-70"
      ),
      children: [
        o && /* @__PURE__ */ t("div", { className: s("absolute right-1 top-1"), children: /* @__PURE__ */ i(
          "span",
          {
            className: s(
              "flex items-center rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium text-amber-800"
            ),
            children: [
              /* @__PURE__ */ t(g, { className: "mr-0.5", size: 10 }),
              "PRO"
            ]
          }
        ) }),
        /* @__PURE__ */ t("div", { className: s("mb-1 text-[22px] text-slate-700"), children: /* @__PURE__ */ t(p, { fallback: null, children: e.icon ? /* @__PURE__ */ t(e.icon, {}) : /* @__PURE__ */ t(x, {}) }) }),
        /* @__PURE__ */ t("p", { className: s("mt-auto text-center text-xs"), children: e.label })
      ]
    }
  );
};
export {
  D as default
};
//# sourceMappingURL=block-navigation-item.js.map
