/**
 * ldesign v0.4.6
 * (c) 2023 ldesign
 * @license MIT
 */

'use strict';

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

var Vue = require('vue');
var popup_utils = require('./utils.js');
require('../utils/dom.js');
require('raf');
require('lodash/isString');
require('../utils/easing.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue);

var Trigger = Vue__default["default"].extend({
  data: function data() {
    return {
      contentRect: null
    };
  },
  mounted: function mounted() {
    var _process$env,
      _this = this;
    if (!this.$el || typeof process !== "undefined" && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === "test") return;
    this.$on("hook:destroyed", popup_utils.observeResize(this.$el, function (ev) {
      _this.$emit("resize", ev);
    }));
  },
  render: function render() {
    var _children$;
    var h = arguments[0];
    var children = this.$slots["default"] || [];
    if (children.length > 1 || !((_children$ = children[0]) !== null && _children$ !== void 0 && _children$.tag)) return h("span", [children]);
    return children[0];
  }
});

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