<script setup lang="ts">
	import { RouterView } from "vue-router";
	import { createWebSocket, sharedWsUrl } from "./services/socket";
	import { useEquipmentStatusStore } from "@/stores/equipmentStatus";
	const equipmentStatusStore = useEquipmentStatusStore()
	const wsClient = createWebSocket(sharedWsUrl);
	wsClient.dataOb.subscribe((data:any) => {
		if (data.type === "status") {
			equipmentStatusStore.setEquipmentStatus(data['data'])
		}
	});
	wsClient.connect();
</script>

<template>
	<RouterView />
</template>
<style scoped>

</style>
