import{Qn as e,Qt as t,Yt as n,b as r,br as i,cn as a,in as o,ir as s,jn as c,kt as l,mr as u,rr as d,v as f,wt as p,x as m,y as h}from"./index-2GYsMIj7.js";var g=a({fullscreen:Boolean,scrollable:Boolean,...c(r({captureFocus:!0,origin:`center center`,scrollStrategy:`block`,transition:{component:l},zIndex:2400,retainFocus:!0}),[`disableInitialFocus`])},`VDialog`),_=o()({name:`VDialog`,props:g(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(r,{emit:a,slots:o}){let c=n(r,`modelValue`),{scopeId:l}=m(),g=i();function _(){a(`afterEnter`),(r.scrim||r.retainFocus)&&g.value?.contentEl&&!g.value.contentEl.contains(document.activeElement)&&g.value.contentEl.focus({preventScroll:!0})}function v(){a(`afterLeave`)}return u(c,async e=>{e||(await s(),g.value.activatorEl?.focus({preventScroll:!0}))}),t(()=>{let t=h.filterProps(r),n=d({"aria-haspopup":`dialog`},r.activatorProps),i=d({tabindex:-1},r.contentProps);return e(h,d({ref:g,class:[`v-dialog`,{"v-dialog--fullscreen":r.fullscreen,"v-dialog--scrollable":r.scrollable},r.class],style:r.style},t,{modelValue:c.value,"onUpdate:modelValue":e=>c.value=e,"aria-modal":`true`,activatorProps:n,contentProps:i,height:r.fullscreen?void 0:r.height,width:r.fullscreen?void 0:r.width,maxHeight:r.fullscreen?void 0:r.maxHeight,maxWidth:r.fullscreen?void 0:r.maxWidth,role:`dialog`,onAfterEnter:_,onAfterLeave:v},l),{activator:o.activator,default:(...t)=>e(p,{root:`VDialog`},{default:()=>[o.default?.(...t)]})})}),f({},g)}});export{_ as t};