import e from"../_util/classNames.mjs";import t from"../_util/props-util/initDefaultProps.mjs";import n from"../config-provider/hooks/useConfigInject.mjs";import r from"./Element.mjs";import i from"./style/index.mjs";import a from"./Paragraph.mjs";import o from"./Title.mjs";import{createVNode as s,defineComponent as c}from"vue";var l=()=>({active:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},prefixCls:String,avatar:{type:[Boolean,Object],default:void 0},title:{type:[Boolean,Object],default:void 0},paragraph:{type:[Boolean,Object],default:void 0},round:{type:Boolean,default:void 0}});function u(e){return e&&typeof e==`object`?e:{}}function d(e,t){return e&&!t?{size:`large`,shape:`square`}:{size:`large`,shape:`circle`}}function f(e,t){return!e&&t?{width:`38%`}:e&&t?{width:`50%`}:{}}function p(e,t){let n={};return(!e||!t)&&(n.width=`61%`),!e&&t?n.rows=3:n.rows=2,n}var m=c({compatConfig:{MODE:3},name:`ASkeleton`,props:t(l(),{avatar:!1,title:!0,paragraph:!0}),setup(t,{slots:c}){let{prefixCls:l,direction:m}=n(`skeleton`,t),[h,g]=i(l);return()=>{let{loading:n,avatar:i,title:_,paragraph:v,active:y,round:b}=t,x=l.value;if(n||t.loading===void 0){let t=!!i||i===``,n=!!_||_===``,c=!!v||v===``,l;if(t){let e={prefixCls:`${x}-avatar`,...d(n,c),...u(i)};l=s(`div`,{class:`${x}-header`},[s(r,e,null)])}let S;if(n||c){let e;n&&(e=s(o,{prefixCls:`${x}-title`,...f(t,c),...u(_)},null));let r;c&&(r=s(a,{prefixCls:`${x}-paragraph`,...p(t,n),...u(v)},null)),S=s(`div`,{class:`${x}-content`},[e,r])}let C=e(x,{[`${x}-with-avatar`]:t,[`${x}-active`]:y,[`${x}-rtl`]:m.value===`rtl`,[`${x}-round`]:b,[g.value]:!0});return h(s(`div`,{class:C},[l,S]))}return c.default?.()}}});export{m as default,l as skeletonProps};