import{Cr as e,Pn as t,Qt as n,_r as r,b as i,dn as a,kt as o,or as s,sn as c,sr as l,tn as u,tr as d,v as f,wt as p,x as m,y as h}from"./index-Cy5HeZ28.js";var g=a({fullscreen:Boolean,scrollable:Boolean,...t(i({captureFocus:!0,origin:`center center`,scrollStrategy:`block`,transition:{component:o},zIndex:2400,retainFocus:!0}),[`disableInitialFocus`])},`VDialog`),_=c()({name:`VDialog`,props:g(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(t,{emit:i,slots:a}){let o=n(t,`modelValue`),{scopeId:c}=m(),g=e();function _(){i(`afterEnter`),(t.scrim||t.retainFocus)&&g.value?.contentEl&&!g.value.contentEl.contains(document.activeElement)&&g.value.contentEl.focus({preventScroll:!0})}function v(){i(`afterLeave`)}return r(o,async e=>{e||(await l(),g.value.activatorEl?.focus({preventScroll:!0}))}),u(()=>{let e=h.filterProps(t),n=s({"aria-haspopup":`dialog`},t.activatorProps),r=s({tabindex:-1},t.contentProps);return d(h,s({ref:g,class:[`v-dialog`,{"v-dialog--fullscreen":t.fullscreen,"v-dialog--scrollable":t.scrollable},t.class],style:t.style},e,{modelValue:o.value,"onUpdate:modelValue":e=>o.value=e,"aria-modal":`true`,activatorProps:n,contentProps:r,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},c),{activator:a.activator,default:(...e)=>d(p,{root:`VDialog`},{default:()=>[a.default?.(...e)]})})}),f({},g)}});export{_ as t};