import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import { resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
import { defineComponent } from 'vue';
import ToolTip, { tooltipProps, tooltipDefaultProps } from './Tooltip';
import { initDefaultProps } from '../_util/props-util';
import useConfigInject from '../_util/hooks/useConfigInject';
import classNames from '../_util/classNames';
export default defineComponent({
  name: 'PfTooltipEllipsis',
  inheritAttrs: false,
  props: initDefaultProps(tooltipProps(), tooltipDefaultProps()),
  slots: ['title'],
  setup: function setup(props, _ref) {
    var slots = _ref.slots;
    var _useConfigInject = useConfigInject('tooltip', props),
      prefixCls = _useConfigInject.prefixCls;
    return function () {
      return _createVNode(ToolTip, _objectSpread(_objectSpread({
        "placement": "top"
      }, props), {}, {
        "overlayClassName": classNames("".concat(prefixCls.value, "-ellipsis"), props.overlayClassName)
      }), _objectSpread(_objectSpread({}, slots), {}, {
        default: function _default() {
          return _createVNode("div", {
            "class": "".concat(prefixCls.value, "-ellipsis-container")
          }, [slots === null || slots === void 0 ? void 0 : slots.default()]);
        }
      }));
    };
  }
});