import{as as v,a as y,c6 as F,y as f,c7 as p,c1 as h,o as x,M as b}from"./index-OSKNspXo.js";let s=0;const E={fullscreen:Boolean,noRouteFullscreenExit:Boolean},g=["update:fullscreen","fullscreen"];function B(){const d=v(),{props:r,emit:m,proxy:e}=d;let n,u,c;const l=y(!1);F(d)===!0&&f(()=>e.$route.fullPath,()=>{r.noRouteFullscreenExit!==!0&&t()}),f(()=>r.fullscreen,o=>{l.value!==o&&a()}),f(l,o=>{m("update:fullscreen",o),m("fullscreen",o)});function a(){l.value===!0?t():i()}function i(){l.value!==!0&&(l.value=!0,c=e.$el.parentNode,c.replaceChild(u,e.$el),document.body.appendChild(e.$el),s++,s===1&&document.body.classList.add("q-body--fullscreen-mixin"),n={handler:t},p.add(n))}function t(){l.value===!0&&(n!==void 0&&(p.remove(n),n=void 0),c.replaceChild(e.$el,u),l.value=!1,s=Math.max(0,s-1),s===0&&(document.body.classList.remove("q-body--fullscreen-mixin"),e.$el.scrollIntoView!==void 0&&setTimeout(()=>{e.$el.scrollIntoView()})))}return h(()=>{u=document.createElement("span")}),x(()=>{r.fullscreen===!0&&i()}),b(t),Object.assign(e,{toggleFullscreen:a,setFullscreen:i,exitFullscreen:t}),{inFullscreen:l,toggleFullscreen:a}}export{E as a,B as b,g as u};
//# sourceMappingURL=use-fullscreen-BRMLiCo9.js.map
