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