1import{F as e,bV as t}from"./useTicketsListSync-DUGkjfS5.js";import{o as s,a8 as o,a6 as l,n,aB as r,ai as i}from"./vendor-uEIK1kwS.js";const a=["innerHTML"],h=["data-testid"],d=["innerHTML"],m=["data-testid"];const c=e({name:"ComponentText",props:["text","html","testid","lines","admin","customColor"],data:()=>({showLess:!0,shouldShowButton:!1}),mounted(){this.handleSeeMore(),window.addEventListener("resize",this.handleSeeMore)},beforeUnmount(){window.removeEventListener("resize",this.handleSeeMore)},methods:{sanitizeHtml:t,toggleShow(){this.showLess=!this.showLess},_getTextEl(){const e=this.$refs.textEl;return e?Array.isArray(e)?e[0]||null:e:null},handleSeeMore(){this.$nextTick(()=>{setTimeout(()=>{const e=this._getTextEl();if(!e)return;const t=e.scrollHeight>e.clientHeight;this.shouldShowButton=!!t,this.showLess=!0},400)})}}},[["render",function(e,t,c,u,p,w){return i(),s("div",null,[p.showLess&&c.html?(i(),s("p",{key:0,ref:"textEl",class:l([c.lines?"line-clamp-9":"line-clamp-2","break-words"]),style:o({color:c.customColor}),innerHTML:w.sanitizeHtml(c.text,{profile:"message"})},null,14,a)):n("",!0),p.showLess&&!c.html?(i(),s("p",{key:1,ref:"textEl",class:l([c.lines?"line-clamp-9":"line-clamp-2","break-words"]),"data-testid":c.testid,style:o({color:c.customColor})},r(c.text),15,h)):!p.showLess&&c.html?(i(),s("p",{key:2,ref:"textEl",style:o({color:c.customColor}),class:"break-words",innerHTML:w.sanitizeHtml(c.text,{profile:"message"})},null,12,d)):p.showLess||c.html?n("",!0):(i(),s("p",{key:3,ref:"textEl",class:"break-words","data-testid":c.testid,style:o({color:c.customColor})},r(c.text),13,m)),p.shouldShowButton?(i(),s("button",{key:4,type:"button",class:l(c.lines?"font-bold text-sm":""),style:o({color:c.lines?"":"var(--base_color, #008ac2)"}),"data-testid":"showMoreTrigger",onClick:t[0]||(t[0]=(...e)=>w.toggleShow&&w.toggleShow(...e))},r(p.showLess?e.$t("pages.Admin.Content.Forms.Components.chatSuporte.text.seeMore"):e.$t("pages.Admin.Content.Forms.Components.chatSuporte.text.seeLess")),7)):n("",!0)])}],["__scopeId","data-v-ea93f90f"]]);export{c as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.