var I=Object.defineProperty,P=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var _=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var f=(a,s,e)=>s in a?I(a,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[s]=e,u=(a,s)=>{for(var e in s||(s={}))z.call(s,e)&&f(a,e,s[e]);if(_)for(var e of _(s))B.call(s,e)&&f(a,e,s[e]);return a},d=(a,s)=>P(a,j(s));import{c as O,ab as R,m as G,d as H,r as L,e as w,b2 as N,ao as q,w as E,f as c,o as n,g as p,j as F,G as k,H as x,I as C,n as b,a4 as v,k as M,q as U}from"./index-C2C--_0G.js";const D={theme:G("text"),rowCol:R(),loading:O(!0),animation:{type:String,default:""},customClass:{type:[String,Array,Object],default:""},customStyle:{type:Object,default(){return{}}}},J={name:"wd-skeleton",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"}},K=H(d(u({},J),{props:D,setup(a){const s={avatar:[{type:"circle",height:"64px",width:"64px"}],image:[{type:"rect",height:"64px",width:"64px"}],text:[1,[{width:"24%",height:"16px",marginRight:"16px"},{width:"76%",height:"16px"}]],paragraph:[1,1,1,{width:"55%"}]},e=a,y=L([]),S=w(()=>y.value.map(t=>{if(N(t))return[{class:m({type:"text"}),style:{}}];if(Array.isArray(t))return t.map(o=>d(u({},o),{class:m(o),style:h(o)}));const r=t;return[d(u({},r),{class:m(r),style:h(r)})]}));function m(t){return["wd-skeleton__col",`wd-skeleton--type-${t.type||"text"}`,{[`wd-skeleton--animation-${e.animation}`]:e.animation}]}function h(t){const r={},o=["size","width","height","margin","background","marginLeft","marginRight","borderRadius","backgroundColor"];for(const l of o)if(Object.prototype.hasOwnProperty.call(t,l)){const i=q(t[l]);l==="size"?(r.width=i,r.height=i):r[l]=i}return r}E(()=>e.rowCol,t=>{y.value=[...Array.isArray(t)&&t.length?e.rowCol:s[e.theme]]},{immediate:!0});const $=w(()=>e.loading==null||e.loading===!0);return(t,r)=>{const o=F;return n(),c(o,{class:v(`wd-skeleton ${t.customClass}`),style:b(t.customStyle)},{default:p(()=>[$.value?(n(),c(o,{key:0,class:"wd-skeleton__content"},{default:p(()=>[(n(!0),k(x,null,C(S.value,(l,i)=>(n(),c(o,{class:"wd-skeleton__row",key:`row-${i}`},{default:p(()=>[(n(!0),k(x,null,C(l,(g,A)=>(n(),c(o,{key:`col-${A}`,class:v(g.class),style:b(g.style)},null,8,["class","style"]))),128))]),_:2},1024))),128))]),_:1})):(n(),c(o,{key:1},{default:p(()=>[M(t.$slots,"default",{},void 0,!0)]),_:3}))]),_:3},8,["class","style"])}}})),V=U(K,[["__scopeId","data-v-b8dcf6c8"]]);export{V as _};