Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`./skeleton-text.cjs`);let n=require(`vue`);var r=e=>e!==``&&!Number.isNaN(Number(e)),i={compatConfig:{MODE:3},name:`DtSkeletonParagraph`,components:{DtSkeletonText:t.default},props:{rows:{type:[Number,String],default:3,validator:r},animate:{type:Boolean,default:!0},minWidth:{type:[Number,String],default:30,validator:r},maxWidth:{type:[Number,String],default:100,validator:r},width:{type:[String,Array],default:null},randomWidth:{type:Boolean,default:!1},offset:{type:Number,default:1},animationDuration:{type:Number,default:-1},contentClass:{type:String,default:``},rowClass:{type:String,default:``}},computed:{integerRows(){return Number(this.rows)}},methods:{randomWidthPercentage(){let e=Math.min(this.minWidth,this.maxWidth),t=Math.max(this.minWidth,this.maxWidth);return`${Math.round(Math.random()*(t-e))+e}%`},getSizeParagraphRow(e){let t=this.width,n=Array.isArray(t),r=t?.[e-1],i=e===this.rows;return this.randomWidth?this.randomWidthPercentage():t&&!n?t:t&&n&&r?r:i?`38%`:`100%`}}};function a(e,t,r,i,a,o){let s=(0,n.resolveComponent)(`dt-skeleton-text`);return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)([`d-skeleton-paragraph`,r.contentClass]),contentClass:``,"data-qa":`skeleton-paragraph`},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.integerRows,e=>((0,n.openBlock)(),(0,n.createBlock)(s,{key:e,"data-qa":`skeleton-paragraph-row`,"content-class":r.rowClass,animate:r.animate,offset:r.offset,"animation-duration":r.animationDuration,width:o.getSizeParagraphRow(e)},null,8,[`content-class`,`animate`,`offset`,`animation-duration`,`width`]))),128))],2)}var o=e.t(i,[[`render`,a]]);exports.default=o;
//# sourceMappingURL=skeleton-paragraph.cjs.map