'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
require('../../popper/index.js');
require('../../../hooks/index.js');
var tokens = require('./tokens.js');
var tooltip = require('./tooltip.js');
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
var trigger = require('../../popper/src/trigger2.js');
var index = require('../../../hooks/use-namespace/index.js');

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

exports["default"] = PsTooltipTrigger;
//# sourceMappingURL=trigger.js.map
