+const clearToggleButtons = (): void => {
+ for (const key in getLocalStorage()) {
+ if (key.includes('toggle-button')) {
+ removeFromLocalStorage(key)
+ }
+ }
+}
+
+const clearChargingStations = (): void => {
+ app!.appContext.config.globalProperties.$chargingStations = []
+ state.value.renderChargingStations = randomUUID()
+}
+
+const uiClient = app?.appContext.config.globalProperties.$uiClient
+
+const getSimulatorState = (): void => {
+ uiClient
+ .simulatorState()
+ .then((response: ResponsePayload) => {
+ state.value.simulatorState = response.state as { started: boolean }
+ })
+ .catch((error: Error) => {
+ $toast.error('Error at fetching simulator state')
+ console.error('Error at fetching simulator state:', error)
+ })
+ .finally(() => {
+ state.value.renderSimulator = randomUUID()
+ })
+}
+