import { defineComponent as u, ref as w, computed as m, openBlock as f, createBlock as C, withCtx as a, renderSlot as s } from "vue";
import { C as g } from "../Shared/base-PQGakkrl.js";
import { _ as P } from "../Shared/Popup.vue_vue_type_script_setup_true_lang-CbaTn8Yz.js";
const k = /* @__PURE__ */ u({
  name: "ClDropdownpopup",
  __name: "Index",
  props: {
    className: {
      type: String,
      default: ""
    },
    dropdownArrowPos: {
      type: String,
      default: "center"
      // left|right|center|top|bottom
    },
    dropDownPos: {
      type: String,
      default: "up"
      // down|up|left|right
    },
    isUseDropdownArrow: {
      type: Boolean,
      default: !0
    },
    appendContainer: {
      type: String,
      default: ""
      // "" | body | 指定容器 #
    },
    transitionEnter: {
      type: String,
      default: "animated fadeIn"
    },
    transitionLeave: {
      type: String,
      default: "animated fadeOut"
    },
    triggers: {
      type: String,
      default: "click"
      // click | hover
    }
  },
  emits: ["onChangeOpen"],
  setup(e, { expose: i, emit: p }) {
    const r = e, l = p, o = w(null), d = m(() => {
      let t = ["panel-dropdownPopup"].join(" ");
      return g.isEmpty(r.className) || (t += " " + r.className), t;
    }), c = (n) => {
      l("onChangeOpen", n);
    };
    return i({
      setOpen: (n) => {
        o.value.setOpen(n);
      },
      calculationPosition: () => o.value.calculationPosition(),
      initCompleteOpen: () => {
        o.value.initCompleteOpen();
      },
      checkCurrentIsOpen: () => o.value.checkCurrentIsOpen()
    }), (n, t) => (f(), C(P, {
      ref_key: "refElDropdownLayer",
      ref: o,
      classParent: d.value,
      classDropDown: "dropdownPopup-dropdown",
      dropdownArrowPos: e.dropdownArrowPos,
      dropDownPos: e.dropDownPos,
      isUseDropdownArrow: e.isUseDropdownArrow,
      appendContainer: e.appendContainer,
      transitionEnter: e.transitionEnter,
      transitionLeave: e.transitionLeave,
      triggers: e.triggers,
      onOnChangeOpen: c
    }, {
      label: a(() => [
        s(n.$slots, "label")
      ]),
      dropdown: a(() => [
        s(n.$slots, "dropdown")
      ]),
      _: 3
    }, 8, ["classParent", "dropdownArrowPos", "dropDownPos", "isUseDropdownArrow", "appendContainer", "transitionEnter", "transitionLeave", "triggers"]));
  }
});
export {
  k as default
};
//# sourceMappingURL=ClDropdownpopup.js.map
