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