/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
import{useSlots as e,computed as i,openBlock as l,createElementBlock as s,normalizeClass as t,unref as n,createBlock as o,withCtx as p,Fragment as r,createTextVNode as m,toDisplayString as u,createCommentVNode as d,renderSlot as a}from"vue";import{isSupportNativeEllipsis as v}from"@gsc-basic/utils";import{useNamespace as x}from"../../hooks/useNamespace.js";import c from"./components/NativeEllipsis.vue.js";import f from"./components/JsEllipsis.vue.js";import './index.css';/* empty css          */import h from"../../_virtual/_plugin-vue_export-helper.js";const b=/* @__PURE__ */h({__name:"index",props:{text:{type:String,required:!0},visibleLine:{type:Number,default:1},visibleHeight:{type:Number},maxLine:{type:Number},maxHeight:{type:Number},ellipsis:{type:Boolean,default:!0},ellipsisNode:{type:String,default:"..."},endExcludes:{type:Array,default:()=>[]},useInnerHtml:{type:Boolean,default:!1},reflowOnResize:{type:Boolean,default:!1},onReflow:{type:Function},onEllipsisClick:{type:Function}},setup(h){const b=h,{prefixCls:y}=x("ellipsis"),g=e(),N=i(()=>v&&(void 0===b.maxLine||b.maxLine===b.visibleLine)&&0===b.endExcludes.length&&"..."===b.ellipsisNode&&void 0===g.ellipsisNode&&void 0===b.maxHeight&&void 0===b.visibleHeight&&void 0===b.onReflow&&void 0===b.onEllipsisClick);return(e,i)=>(l(),s("div",{class:t([n(y)])},[N.value?(l(),o(c,{key:0,text:b.text,"visible-line":b.visibleLine,ellipsis:b.ellipsis,"use-inner-html":b.useInnerHtml},null,8,["text","visible-line","ellipsis","use-inner-html"])):(l(),o(f,{key:1,text:h.text,"use-inner-html":h.useInnerHtml,"visible-line":h.visibleLine,"visible-height":h.visibleHeight,"max-line":h.maxLine,"max-height":h.maxHeight,ellipsis:h.ellipsis,"end-excludes":h.endExcludes,"reflow-on-resize":h.reflowOnResize,"on-reflow":h.onReflow,"on-ellipsis-click":h.onEllipsisClick},{ellipsisNode:p(()=>[n(g).ellipsisNode?d("",!0):(l(),s(r,{key:0},[m(u(h.ellipsisNode),1)],64)),a(e.$slots,"ellipsisNode",{},void 0,!0)]),_:3},8,["text","use-inner-html","visible-line","visible-height","max-line","max-height","ellipsis","end-excludes","reflow-on-resize","on-reflow","on-ellipsis-click"]))],2))}},[["__scopeId","data-v-b7d22322"]]);export{b as default};