"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("./types.js"),u=require("element-plus"),v=e.defineComponent({name:" TextEllipsis",__name:"index",props:h.TextEllipsisProps,setup(c){const i=u.useNamespace("text-ellipsis"),l=c,s=e.shallowRef(null),o=e.shallowRef(),n=e.shallowRef(!1),f=()=>{var t;o.value&&o.value.scrollHeight>o.value.offsetHeight*1.5&&(n.value=!0,(t=s.value)==null||t.onOpen())},d=()=>{var t;(t=s.value)==null||t.onClose(),n.value=!1},m=e.computed(()=>{var a;return(a=l.tooltip)!=null&&a.maxWidth?`${l.tooltip.maxWidth}px`:"240px"});return(t,a)=>{var r,p;return e.openBlock(),e.createBlock(e.unref(u.ElTooltip),e.mergeProps({ref_key:"toolTipIns",ref:s,"append-to":"body"},l.tooltip,{effect:((r=l.tooltip)==null?void 0:r.effect)??"light",disabled:!n.value,placement:((p=l.tooltip)==null?void 0:p.placement)??"top"}),{content:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([e.unref(i).e("content")]),style:e.normalizeStyle({maxWidth:m.value})},[e.renderSlot(t.$slots,"default")],6)]),default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass([e.unref(i).b()]),ref_key:"spanRef",ref:o,style:e.normalizeStyle({"--wet-pro-line-clamp":l.rows}),onMouseenter:f,onMouseleave:d},[e.renderSlot(t.$slots,"default")],38)]),_:3},16,["effect","disabled","placement"])}}});exports.default=v;
