import { defineComponent as p, ref as m, computed as f, provide as u, openBlock as l, createBlock as D, withCtx as i, createElementVNode as r, renderSlot as t, createElementBlock as y, createTextVNode as d, toDisplayString as c } from "vue";
import { C as L } from "../Shared/base-PQGakkrl.js";
import { _ as v } from "../Shared/Popup.vue_vue_type_script_setup_true_lang-CbaTn8Yz.js";
const E = {
  key: 0,
  class: "dropdownLayer-text-container"
}, b = { class: "dropdownLayer-text-render" }, k = /* @__PURE__ */ p({
  name: "ClDropdownmenu",
  __name: "Index",
  props: {
    className: String,
    classDropDown: String,
    label: String,
    direction: {
      type: String,
      default: "left"
      // left right
    },
    isUseLabelArrow: {
      type: Boolean,
      default: !1
    },
    isUseDropdownArrow: {
      type: Boolean,
      default: !1
    },
    transitionEnter: String,
    transitionLeave: String
  },
  setup(e) {
    const s = e, a = m(null), w = f(() => {
      let o = ["panel-dropdownmenu"].join(" ");
      return L.isEmpty(s.className) || (o += " " + s.className), o;
    });
    return u("$DropdownmenuTop", {
      hideDropdown: () => {
        a.value.setOpen(!1);
      }
    }), (n, o) => (l(), D(v, {
      ref_key: "refElDropdownLayer",
      ref: a,
      classParent: w.value,
      classDropDown: e.classDropDown,
      dropdownArrowPos: e.direction,
      isUseDropdownArrow: e.isUseDropdownArrow,
      transitionEnter: e.transitionEnter,
      transitionLeave: e.transitionLeave
    }, {
      label: i(() => [
        e.isUseLabelArrow ? (l(), y("div", E, [
          r("div", b, [
            t(n.$slots, "label", {}, () => [
              d(c(e.label), 1)
            ])
          ]),
          o[0] || (o[0] = r("div", { class: "dropdownLayer-text-arrow" }, [
            r("i", { class: "clIconFont clIcon-angle-down" })
          ], -1))
        ])) : t(n.$slots, "label", { key: 1 }, () => [
          d(c(e.label), 1)
        ])
      ]),
      dropdown: i(() => [
        r("ul", null, [
          t(n.$slots, "default")
        ])
      ]),
      _: 3
    }, 8, ["classParent", "classDropDown", "dropdownArrowPos", "isUseDropdownArrow", "transitionEnter", "transitionLeave"]));
  }
});
export {
  k as default
};
//# sourceMappingURL=ClDropdownmenu.js.map
