{"version":3,"file":"use-breakpoints-COBa-814.js","sources":["../../../app/frontend/vue/src/utils/const/breakpoints.js","../../../app/frontend/vue/src/composables/use-breakpoints.js"],"sourcesContent":["export default {\n lg: 1200,\n md: 992,\n sm: 768,\n xs: 576,\n};\n","/* eslint-disable no-unused-vars */\nimport { useWindowSize } from '@vueuse/core';\nimport { computed, ref } from 'vue';\nimport breakpoints from '@front/utils/const/breakpoints';\n\nexport default function useBreakpoints(opts = {}) {\n const { xs, sm } = breakpoints;\n const { width } = useWindowSize();\n const refWidth = ref(width);\n\n const isSmallMobile = computed(() => refWidth.value < xs);\n const isMobile = computed(() => refWidth.value < sm);\n // TODO: использовать md вместо 1024, или поменять 991 на 1024 в md\n const isTablet = computed(() => refWidth.value >= sm && refWidth.value <= 1024);\n const isLaptop = computed(() => refWidth.value > 1024);\n\n const isTabletOrMobile = computed(() => isMobile.value || isTablet.value);\n\n return {\n isSmallMobile, isMobile, isTablet, isTabletOrMobile, isLaptop,\n };\n}\n"],"names":["breakpoints","lg","md","sm","xs","useBreakpoints","opts","width","useWindowSize","refWidth","ref","isSmallMobile","computed","value","isMobile","isTablet","isLaptop","isTabletOrMobile"],"mappings":"uFAAA,MAAeA,EAAA,CACbC,GAAI,KACJC,GAAI,IACJC,GAAI,IACJC,GAAI,KCCS,SAASC,EAAeC,EAAO,IACtC,MAAAF,GAAEA,EAAID,GAAAA,GAAOH,GACbO,MAAEA,GAAUC,IACZC,EAAWC,EAAIH,GAEfI,EAAgBC,GAAS,IAAMH,EAASI,MAAQT,IAChDU,EAAWF,GAAS,IAAMH,EAASI,MAAQV,IAE3CY,EAAWH,GAAS,IAAMH,EAASI,OAASV,GAAMM,EAASI,OAAS,OACpEG,EAAWJ,GAAS,IAAMH,EAASI,MAAQ,OAE3CI,EAAmBL,GAAS,IAAME,EAASD,OAASE,EAASF,QAE5D,MAAA,CACLF,gBAAeG,WAAUC,WAAUE,mBAAkBD,WAEzD"}