import { createElementBlock as n, openBlock as t, createElementVNode as _, Fragment as h, renderList as y, normalizeClass as d, createBlock as k, createCommentVNode as r, resolveDynamicComponent as f, toDisplayString as a } from "vue";
/* empty css                 */
import g from "../../../_virtual/_plugin-vue_export-helper.js";
const v = ["id", "data-theme"], x = { class: "context-menu__list" }, C = ["onClick"], b = ["src"], w = {
  key: 3,
  style: { "white-space": "nowrap" }
}, M = { key: 4 }, B = {
  __name: "ContextMenu",
  props: {
    actions: {
      type: Array,
      required: !0
    },
    id: {
      type: String,
      default: ""
    },
    dataTheme: {
      type: String,
      default: "light"
    }
  },
  emits: ["click", "mouseenter", "mouseleave"],
  setup(o, { emit: u }) {
    const l = o, i = u, p = (c) => {
      const s = l.actions[c];
      i("click", s);
    };
    return (c, s) => (t(), n("div", {
      id: o.id,
      class: "context-menu__container",
      "data-theme": o.dataTheme,
      onMouseenter: s[0] || (s[0] = (e) => i("mouseenter")),
      onMouseleave: s[1] || (s[1] = (e) => i("mouseleave"))
    }, [
      _("ul", x, [
        (t(!0), n(h, null, y(l.actions, (e, m) => (t(), n("li", {
          key: m,
          class: d(["context-menu__item", { "context-menu__item--disabled": e.disabled }]),
          onClick: (S) => !e.disabled && p(m)
        }, [
          e.icon && typeof e.icon == "string" ? (t(), n("img", {
            key: 0,
            src: e.icon,
            width: "18",
            height: "18"
          }, null, 8, b)) : e.icon && typeof e.icon == "object" ? (t(), k(f(e.icon), {
            key: 1,
            width: "18",
            height: "18"
          })) : e.prime ? (t(), n("i", {
            key: 2,
            class: d("pi pi-" + e.prime)
          }, null, 2)) : r("", !0),
          e.title ? (t(), n("span", w, a(e.title), 1)) : r("", !0),
          e.description ? (t(), n("span", M, a(e.description), 1)) : r("", !0)
        ], 10, C))), 128))
      ])
    ], 40, v));
  }
}, N = /* @__PURE__ */ g(B, [["__scopeId", "data-v-e3896a76"]]);
export {
  N as default
};
