import{V as s,p as a,n as i}from"./client-BmVmnFEC.js";const l=s.extend({props:{text:{type:String,default:""},lineCount:{type:Number,default:2},expandText:{type:String,default:"もっとみる"},shrinkable:{type:Boolean,default:!1},shrinkText:{type:String,default:"閉じる"},clickActionType:{type:String,default:null},clickActionValue:{type:Object,default:null},isDisplayed:{type:Boolean,default:!1}},data(){return{isExpanded:!1,shouldShowExpandButton:!1}},watch:{isDisplayed(e){e&&(this.shouldShowExpandButton=this.checkIsClamped())}},mounted(){this.shouldShowExpandButton=this.checkIsClamped()},methods:{expand(){this.isExpanded=!0,this.$emit("enter",this.isExpanded),this.clickActionType&&a({type:"action",actionType:this.clickActionType,...this.clickActionValue?{actionValue:this.clickActionValue}:{}})},shrink(){this.isExpanded=!1,this.$emit("enter",this.isExpanded)},checkIsClamped(){const{content:e}=this.$refs;return e instanceof Element?e.scrollHeight>e.clientHeight:!1}}});var c=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{staticClass:"clamped-text"},[n("p",{ref:"content",staticClass:"clamped-text__content",class:{"clamped-text__content--is-expanded":t.isExpanded},style:{"--line-count":`${t.lineCount}`}},[t._v(t._s(t.text))]),t.shouldShowExpandButton?[t.isExpanded?t.shrinkable?n("span",{staticClass:"clamped-text__button",on:{click:t.shrink}},[t._v(t._s(t.shrinkText))]):t._e():n("span",{staticClass:"clamped-text__button",on:{click:t.expand}},[t._v(t._s(t.expandText))])]:t._e()],2)},o=[],d=i(l,c,o,!1,null,"559a01fd");const r=d.exports;export{r as C};