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