import { defineComponent as u, ref as f, computed as r, openBlock as g, createBlock as y, withCtx as a, renderSlot as i } from "vue";
import { _ as O } from "./Base.vue_vue_type_script_setup_true_lang-Duh9tbur.js";
import { C as l } from "./base-PQGakkrl.js";
const E = /* @__PURE__ */ u({
  name: "ClDropdownlayerPopup",
  __name: "Popup",
  props: {
    classParent: String,
    classText: String,
    classDropDown: String,
    isDisabled: {
      type: Boolean,
      default: !1
    },
    dropdownArrowPos: {
      type: String,
      default: "left"
      // left|right|center
    },
    dropDownPos: {
      type: String,
      default: "down"
      // down|up
    },
    isUseDropdownArrow: {
      type: Boolean,
      default: !1
    },
    isCloseDestroy: {
      type: Boolean,
      default: !1
    },
    isInitDelayComplete: {
      type: Boolean,
      default: !1
    },
    transitionEnter: String,
    transitionLeave: String,
    appendContainer: {
      type: String,
      default: ""
      // "" | body | 指定容器 #
    },
    onOpenBeforeCallback: Function,
    triggers: {
      type: String,
      default: "click"
      // click | hover
    }
  },
  emits: ["onChangeOpen", "onChangePosition", "onOpenComplete"],
  setup(n, { expose: p, emit: c }) {
    const o = n, s = c, t = f(), d = r(() => {
      let e = " dropdownLayer-theme-popup ";
      return o.classParent && !l.isEmpty(o.classParent) && (e += o.classParent), e;
    }), w = r(() => {
      let e = " dropdownLayer-dropdown-theme-popup ";
      return o.classDropDown && !l.isEmpty(o.classDropDown) && (e += o.classDropDown), e;
    }), C = (e) => {
      s("onChangeOpen", e);
    }, D = (e) => {
      s("onChangePosition", e);
    }, m = () => {
      s("onOpenComplete");
    };
    return p({
      setOpen: (e) => {
        t.value.setOpen(e);
      },
      calculationPosition: () => t.value.calculationPosition(),
      initCompleteOpen: () => {
        t.value.initCompleteOpen();
      },
      checkCurrentIsOpen: () => t.value.getIsShowOpen()
    }), (e, b) => (g(), y(O, {
      ref_key: "refElDropdownLayer",
      ref: t,
      classParent: d.value,
      classText: n.classText,
      classDropDown: w.value,
      isDisabled: n.isDisabled,
      dropdownArrowPos: n.dropdownArrowPos,
      dropDownPos: n.dropDownPos,
      isUseDropdownArrow: n.isUseDropdownArrow,
      isCloseDestroy: n.isCloseDestroy,
      isInitDelayComplete: n.isInitDelayComplete,
      appendContainer: n.appendContainer,
      transitionEnter: n.transitionEnter,
      transitionLeave: n.transitionLeave,
      triggers: n.triggers,
      onOpenBeforeCallback: n.onOpenBeforeCallback,
      onOnChangeOpen: C,
      onOnChangePosition: D,
      onOnOpenComplete: m
    }, {
      labelText: a(() => [
        i(e.$slots, "label")
      ]),
      dropdown: a(() => [
        i(e.$slots, "dropdown")
      ]),
      _: 3
    }, 8, ["classParent", "classText", "classDropDown", "isDisabled", "dropdownArrowPos", "dropDownPos", "isUseDropdownArrow", "isCloseDestroy", "isInitDelayComplete", "appendContainer", "transitionEnter", "transitionLeave", "triggers", "onOpenBeforeCallback"]));
  }
});
export {
  E as _
};
//# sourceMappingURL=Popup.vue_vue_type_script_setup_true_lang-CbaTn8Yz.js.map
