"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),m=require("../_util/classNames.js"),w=require("../_util/props-util/initDefaultProps.js"),S=require("../config-provider/hooks/useConfigInject.js"),j=require("./Element.js"),x=require("./Paragraph.js"),V=require("./Title.js"),k=require("./style/index.js"),P=()=>({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 p(e){return e&&typeof e=="object"?e:{}}function O(e,a){return e&&!a?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function M(e,a){return!e&&a?{width:"38%"}:e&&a?{width:"50%"}:{}}function T(e,a){const r={};return(!e||!a)&&(r.width="61%"),!e&&a?r.rows=3:r.rows=2,r}const z=n.defineComponent({compatConfig:{MODE:3},name:"ASkeleton",props:w.default(P(),{avatar:!1,title:!0,paragraph:!0}),setup(e,{slots:a}){const{prefixCls:r,direction:N}=S.default("skeleton",e),[$,q]=k.default(r);return()=>{const{loading:B,avatar:u,title:d,paragraph:c,active:C,round:y}=e,t=r.value;if(B||e.loading===void 0){const o=!!u||u==="",i=!!d||d==="",l=!!c||c==="";let g;if(o){const s={prefixCls:`${t}-avatar`,...O(i,l),...p(u)};g=n.createVNode("div",{class:`${t}-header`},[n.createVNode(j.default,s,null)])}let v;if(i||l){let s;if(i){const f={prefixCls:`${t}-title`,...M(o,l),...p(d)};s=n.createVNode(V.default,f,null)}let h;if(l){const f={prefixCls:`${t}-paragraph`,...T(o,i),...p(c)};h=n.createVNode(x.default,f,null)}v=n.createVNode("div",{class:`${t}-content`},[s,h])}const b=m.default(t,{[`${t}-with-avatar`]:o,[`${t}-active`]:C,[`${t}-rtl`]:N.value==="rtl",[`${t}-round`]:y,[q.value]:!0});return $(n.createVNode("div",{class:b},[g,v]))}return a.default?.()}}});exports.default=z;exports.skeletonProps=P;
