import{x as g,c2 as m,B as n,c as p,o as f,n as S,e as v,a as b,z as _,E as y,_ as C}from"./app-q0jdcHwC.js";const s={rectangle:"rectangle",circle:"circle"},h={[s.rectangle]:"rounded",[s.circle]:"rounded-full"},c="#ffffff",E=e=>{const t=e.replace("#","");return typeof e=="string"&&e.startsWith("#")&&t.length===6&&!isNaN(+("0x"+t))},$=e=>{var t;return`${(t=e.match(/\w\w/g))==null?void 0:t.map(r=>+`0x${r}`)}`},x=g({__name:"SkeletonLoader",props:{type:{type:String,default:s.rectangle,validator(e){return Object.values(s).includes(e)}},bgClass:{type:String,default:"bg-gray-300"},cssClass:{type:String,default:""},shimmerColor:{type:String,default:c}},setup(e){const t=e,{type:r,bgClass:i,cssClass:l,shimmerColor:o}=m(t),u=n(()=>{const a=E(o.value)?$(o.value):c;return{backgroundImage:`linear-gradient(90deg, rgba(${a}, 0) 0%, rgba(${a}, 0.2) 20%, rgba(${a}, 0.5) 60%, rgba(${a}, 0))`}}),d=n(()=>l.value?l.value:h[r.value]);return(a,L)=>(f(),p("div",{class:S([v(i),d.value,"relative overflow-hidden"])},[b("div",{class:"shimmer absolute top-0 right-0 bottom-0 left-0",style:y(u.value)},null,4),_(a.$slots,"default",{},void 0,!0)],2))}}),k=C(x,[["__scopeId","data-v-18e9e98a"]]);export{k as S};
