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,en as c,hr as l,ir as u,on as d,un as f,x as p,xr as m,y as h}from"./index-C5ry6YBg.js";var g=f({fullscreen:Boolean,scrollable:Boolean,...n(p({captureFocus:!0,origin:`center center`,scrollStrategy:`block`,transition:{component:t},zIndex:2400,retainFocus:!0}),[`disableInitialFocus`])},`VDialog`),_=d()({name:`VDialog`,props:g(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(t,{emit:n,slots:d}){let f=a(t,`modelValue`),{scopeId:p}=r(),g=m();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 l(f,async e=>{e||(await o(),g.value.activatorEl?.focus({preventScroll:!0}))}),c(()=>{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:f.value,"onUpdate:modelValue":e=>f.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},p),{activator:d.activator,default:(...t)=>e(i,{root:`VDialog`},{default:()=>[d.default?.(...t)]})})}),h({},g)}});export{_ as t};