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