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