{"version":3,"file":"useIsFullscreen.mjs","sources":["../../src/composables/useIsFullscreen/index.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { readonly, ref } from 'vue'\n\n// if the window height is equal to the screen height,\n// we're in full screen mode\nconst checkIfIsFullscreen = () => window.outerHeight === screen.height\n\nconst isFullscreen = ref(checkIfIsFullscreen())\n\nwindow.addEventListener('resize', () => {\n\tisFullscreen.value = checkIfIsFullscreen()\n})\n\n/**\n * Use global isFullscreen state, based on the screen height check\n *\n * @return {import('vue').DeepReadonly>}\n */\nexport function useIsFullscreen() {\n\treturn readonly(isFullscreen)\n}\n\n/**\n * @deprecated Is to be removed in v9.0.0 with Vue 3 migration.\n * Use `composables/useIsFullscreen` instead.\n * Defined and exported only for isFullscreen mixin.\n */\nexport const isFullscreenState = readonly(isFullscreen)\n"],"names":[],"mappings":";AASA,MAAM,sBAAsB,MAAM,OAAO,gBAAgB,OAAO;AAEhE,MAAM,eAAe,IAAI,qBAAqB;AAE9C,OAAO,iBAAiB,UAAU,MAAM;AACvC,eAAa,QAAQ,oBAAqB;AAC3C,CAAC;AAOM,SAAS,kBAAkB;AACjC,SAAO,SAAS,YAAY;AAC7B;AAOY,MAAC,oBAAoB,SAAS,YAAY;"}