import{_ as d,R as o,r as p,o as s,b as i,p as n,l as r,n as l,t as c,v as _,q as f}from"./main-BDtKGhFI.js";const m={name:"TextExpanderFi",components:{RichtextFi:o},props:{content:{type:Object,default:()=>({})},expandText:{type:String,default:"expand"},reduceText:{type:String,default:"reduce"},maxHeight:{type:Number,default:200}},data(){return{isExpandable:!1,isExpanded:!1,contentHeightExpanded:0,contentStyles:null}},mounted(){this.$refs.expanderContent.$el.clientHeight>this.maxHeight&&(this.isExpandable=!0)}},u={class:"text-expander-fi"},h={class:"text-expander-fi__inner"},E={key:0,class:"text-expander-fi__expand"};function g(b,a,t,y,e,v){const x=p("richtext-fi");return s(),i("div",u,[n("div",{class:l({"text-expander-fi__content":!0,"text-expander-fi__content--expanded":e.isExpanded||!e.isExpandable,"text-expander-fi__content--expandable":e.isExpandable}),style:c({gridTemplateRows:`${t.maxHeight}px ${e.isExpanded?1:0}fr`,maxHeight:e.isExpandable?null:`${t.maxHeight}px`})},[n("div",h,[r(x,{ref:"expanderContent","html-content":t.content},null,8,["html-content"])])],6),e.isExpandable?(s(),i("div",E,[n("span",{class:"text-expander-fi__expand-text",onClick:a[0]||(a[0]=T=>e.isExpanded=!e.isExpanded)},_(e.isExpanded?t.reduceText:t.expandText),1)])):f("",!0)])}const C=d(m,[["render",g],["__scopeId","data-v-5036d828"]]);export{C as T};