import{A as e,I as t,Q as n,Y as r,_ as i,g as a,ut as o,x as s,yt as c,z as l}from"./vue.runtime.esm-bundler-DS0mm12S.js";import{t as u}from"./utils-u71wZLxr.js";import{rt as d,tt as f}from"./index-aDrlI3dP.js";import{i as p}from"./button-DQxx5HZh.js";import{t as m}from"./useForwardExpose-DNY3s-e3.js";import{r as h}from"./AvatarImage-CNISnOAp.js";var g=s({__name:`AvatarFallback`,props:{delayMs:{type:Number,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let s=e,u=h();m();let d=o(s.delayMs===void 0);return r(e=>{if(s.delayMs&&f){let t=window.setTimeout(()=>{d.value=!0},s.delayMs);e(()=>{window.clearTimeout(t)})}}),(e,r)=>d.value&&c(u).imageLoadingStatus.value!==`loaded`?(t(),a(c(p),{key:0,"as-child":e.asChild,as:e.as},{default:n(()=>[l(e.$slots,`default`)]),_:3},8,[`as-child`,`as`])):i(`v-if`,!0)}}),_=s({__name:`AvatarFallback`,props:{delayMs:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(r){let i=r,o=d(i,`class`);return(r,s)=>(t(),a(c(g),e({"data-slot":`avatar-fallback`},c(o),{class:c(u)(`bg-muted flex size-full items-center justify-center rounded-full`,i.class)}),{default:n(()=>[l(r.$slots,`default`)]),_:3},16,[`class`]))}});export{_ as t};