import{f as S,o as I,w as N,m as h,d as _,t as w,v as o,x as u,C as y,B as a,c1 as B,I as g,A as p,_ as b,bz as E,F as c,aq as f,bA as k,z as v,c2 as $,c as P,L as z,av as C}from"./index.cae74add.js";const T=(l,n=0)=>{if(n===0)return l;const s=S(!1);let t=0;const r=()=>{t&&clearTimeout(t),t=window.setTimeout(()=>{s.value=l.value},n)};return I(r),N(()=>l.value,e=>{e?r():s.value=e}),s},L=h({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),A=h({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),F={name:"ElSkeletonItem"},R=_({...F,props:A,setup(l){const n=w("skeleton");return(s,t)=>(o(),u("div",{class:p([a(n).e("item"),a(n).e(s.variant)])},[s.variant==="image"?(o(),y(a(B),{key:0})):g("v-if",!0)],2))}});var i=b(R,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]);const V={name:"ElSkeleton"},q=_({...V,props:L,setup(l,{expose:n}){const s=l,t=w("skeleton"),r=T(E(s,"loading"),s.throttle);return n({uiLoading:r}),(e,M)=>a(r)?(o(),u("div",k({key:0,class:[a(t).b(),a(t).is("animated",e.animated)]},e.$attrs),[(o(!0),u(c,null,f(e.count,m=>(o(),u(c,{key:m},[e.loading?v(e.$slots,"template",{key:m},()=>[P(i,{class:p(a(t).is("first")),variant:"p"},null,8,["class"]),(o(!0),u(c,null,f(e.rows,d=>(o(),y(i,{key:d,class:p([a(t).e("paragraph"),a(t).is("last",d===e.rows&&e.rows>1)]),variant:"p"},null,8,["class"]))),128))]):g("v-if",!0)],64))),128))],16)):v(e.$slots,"default",$(k({key:1},e.$attrs)))}});var H=b(q,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]);const D=z(H,{SkeletonItem:i}),G=C(i);export{D as E,G as a};
