import { defineComponent, inject, ref, resolveComponent, openBlock, createBlock, normalizeClass, withCtx, renderSlot } from 'vue';
import '../../popper/index.mjs';
import '../../../hooks/index.mjs';
import { TOOLTIP_INJECTION_KEY } from './tokens.mjs';
import { useTooltipTriggerProps } from './tooltip.mjs';
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
import PsPopperTrigger from '../../popper/src/trigger2.mjs';
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';

const _sfc_main = defineComponent({
  name: "PsTooltipTrigger",
  components: {
    PsPopperTrigger
  },
  props: useTooltipTriggerProps,
  setup() {
    const ns = useNamespace("tooltip");
    const { id, open } = inject(TOOLTIP_INJECTION_KEY, void 0);
    const triggerRef = ref(null);
    return {
      open,
      id,
      triggerRef,
      ns
    };
  }
});
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ps_popper_trigger = resolveComponent("ps-popper-trigger");
  return openBlock(), createBlock(_component_ps_popper_trigger, {
    id: _ctx.id,
    "virtual-ref": _ctx.virtualRef,
    open: _ctx.open,
    "virtual-triggering": _ctx.virtualTriggering,
    class: normalizeClass(_ctx.ns.e("trigger"))
  }, {
    default: withCtx(() => [
      renderSlot(_ctx.$slots, "default")
    ]),
    _: 3
  }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class"]);
}
var PsTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/tooltip/src/trigger.vue"]]);

export { PsTooltipTrigger as default };
//# sourceMappingURL=trigger.mjs.map
