import{cr as a,r as e,f as t,w as s,H as l,cW as n,B as i,C as o,N as r,M as u,o as c,c as p,v as d,p as v,dc as m,e as f,n as g,P as k,bL as y,F as b,g as h,O as w,a as x,aa as B,aL as N,a2 as S,a3 as $}from"./index-BhrLSE9x.js";const _=i({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:o([Number,Object])}}),E=i({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),L=r({name:"ElSkeletonItem"});var j=k(r({...L,props:E,setup(a){const e=u("skeleton");return(a,t)=>(c(),p("div",{class:g([v(e).e("item"),v(e).e(a.variant)])},["image"===a.variant?(c(),d(v(m),{key:0})):f("v-if",!0)],2))}}),[["__file","skeleton-item.vue"]]);const I=r({name:"ElSkeleton"});const O=S(k(r({...I,props:_,setup(i,{expose:o}){const r=i,m=u("skeleton"),k=((i,o=0)=>{if(0===o)return i;const r=a(o)&&Boolean(o.initVal),u=e(r);let c=null;const p=a=>{n(a)?u.value=i.value:(c&&clearTimeout(c),c=setTimeout((()=>{u.value=i.value}),a))},d=e=>{"leading"===e?l(o)?p(o):p(o.leading):a(o)?p(o.trailing):u.value=!1};return t((()=>d("leading"))),s((()=>i.value),(a=>{d(a?"leading":"trailing")})),u})(y(r,"loading"),r.throttle);return o({uiLoading:k}),(a,e)=>v(k)?(c(),p("div",B({key:0,class:[v(m).b(),v(m).is("animated",a.animated)]},a.$attrs),[(c(!0),p(b,null,h(a.count,(e=>(c(),p(b,{key:e},[v(k)?w(a.$slots,"template",{key:e},(()=>[x(j,{class:g(v(m).is("first")),variant:"p"},null,8,["class"]),(c(!0),p(b,null,h(a.rows,(e=>(c(),d(j,{key:e,class:g([v(m).e("paragraph"),v(m).is("last",e===a.rows&&a.rows>1)]),variant:"p"},null,8,["class"])))),128))])):f("v-if",!0)],64)))),128))],16)):w(a.$slots,"default",N(B({key:1},a.$attrs)))}}),[["__file","skeleton.vue"]]),{SkeletonItem:j}),T=$(j);export{T as E,O as a};
