import{O as P,aZ as b,a_ as x,C as E,Z as y,a$ as D,Q as w,b0 as A,b1 as F,bt as I,b3 as u,m as r,p as d,a3 as L,x as S,aI as O}from"./DTuz8pPt.js";const B=w({fullscreen:Boolean,scrollable:Boolean,...A(F({captureFocus:!0,origin:"center center",scrollStrategy:"block",transition:{component:I},zIndex:2400,retainFocus:!0}),["disableInitialFocus"])},"VDialog"),H=P()({name:"VDialog",props:B(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,f){let{emit:i,slots:s}=f;const n=b(e,"modelValue"),{scopeId:v}=x(),a=S();function m(){i("afterEnter"),(e.scrim||e.retainFocus)&&a.value?.contentEl&&!a.value.contentEl.contains(document.activeElement)&&a.value.contentEl.focus({preventScroll:!0})}function g(){i("afterLeave")}return E(n,async l=>{l||(await O(),a.value.activatorEl?.focus({preventScroll:!0}))}),y(()=>{const l=u.filterProps(e),V=r({"aria-haspopup":"dialog"},e.activatorProps),h=r({tabindex:-1},e.contentProps);return d(u,r({ref:a,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},l,{modelValue:n.value,"onUpdate:modelValue":t=>n.value=t,"aria-modal":"true",activatorProps:V,contentProps:h,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:m,onAfterLeave:g},v),{activator:s.activator,default:function(){for(var t=arguments.length,c=new Array(t),o=0;o<t;o++)c[o]=arguments[o];return d(L,{root:"VDialog"},{default:()=>[s.default?.(...c)]})}})}),D({},a)}});export{H as V};