useDashboard-YUHLBYq_.mjs 1.07 KB
import { z as createSharedComposable, d as useRoute$1, e as useRouter } from './server.mjs';
import { ref, watch } from 'vue';
import { d as defineShortcuts } from './defineShortcuts-DCIlkKIY.mjs';

const _useDashboard = () => {
  const route = useRoute$1();
  const router = useRouter();
  const isNotificationsSlideoverOpen = ref(false);
  defineShortcuts({
    "g-h": () => router.push("/"),
    "g-w": () => router.push("/work-orders"),
    "g-n": () => router.push("/sn-management"),
    "g-o": () => router.push("/operations"),
    "g-i": () => router.push("/inbox"),
    "g-c": () => router.push("/customers"),
    "g-d": () => router.push("/base-info/device-types"),
    "g-s": () => router.push("/settings"),
    "n": () => isNotificationsSlideoverOpen.value = !isNotificationsSlideoverOpen.value
  });
  watch(() => route.fullPath, () => {
    isNotificationsSlideoverOpen.value = false;
  });
  return {
    isNotificationsSlideoverOpen
  };
};
const useDashboard = createSharedComposable(_useDashboard);

export { useDashboard as u };
//# sourceMappingURL=useDashboard-YUHLBYq_.mjs.map