import{Er as e,Mr as t,N as n,Nr as r,Yr as i,a,et as o,hn as s,i as c,ii as l,kn as u,o as d,r as f,rr as p,vn as m,wn as h}from"./index-BKLG6eUi.js";var g=u({fullscreen:Boolean,scrollable:Boolean,...p(a({captureFocus:!0,origin:`center center`,scrollStrategy:`block`,transition:{component:n},zIndex:2400,retainFocus:!0}),[`disableInitialFocus`])},`VDialog`),_=h()({name:`VDialog`,props:g(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(n,{emit:a,slots:u}){let p=s(n,`modelValue`),{scopeId:h}=d(),g=l();function _(){a(`afterEnter`),(n.scrim||n.retainFocus)&&g.value?.contentEl&&!g.value.contentEl.contains(document.activeElement)&&g.value.contentEl.focus({preventScroll:!0})}function v(){a(`afterLeave`)}return i(p,async e=>{e||(await r(),g.value.activatorEl?.focus({preventScroll:!0}))}),m(()=>{let r=c.filterProps(n),i=t({"aria-haspopup":`dialog`},n.activatorProps),a=t({tabindex:-1},n.contentProps);return e(c,t({ref:g,class:[`v-dialog`,{"v-dialog--fullscreen":n.fullscreen,"v-dialog--scrollable":n.scrollable},n.class],style:n.style},r,{modelValue:p.value,"onUpdate:modelValue":e=>p.value=e,"aria-modal":`true`,activatorProps:i,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},h),{activator:u.activator,default:(...t)=>e(o,{root:`VDialog`},{default:()=>[u.default?.(...t)]})})}),f({},g)}});export{_ as t};