import { useStorage } from '@vueuse/core';

// static
export const CURRENT_ANNOUNCEMENT_ID = 1;
export const BASE_PATH = '';

// string
export const temperatureFormat = useStorage('temperature-display', 'fahrenheit');
// boolean
export const autoUpdatePositionInUrl =  useStorage('auto-update-url', true);
export const enableMapAnimations = useStorage('map-animations', true);
export const hasSeenInfoModal = useStorage('seen-info-modal', false);
// time in seconds
export const nodesMaxAge = useStorage('nodes-max-age', null);
export const nodesDisconnectedAge = useStorage('nodes-max-disconnected-age', 604800);
export const nodesOfflineAge = useStorage('nodes-offline-age', null);
export const waypointsMaxAge = useStorage('waypoints-max-age', 604800);
// number
export const goToNodeZoomLevel = useStorage('zoom-to-node', 15);
export const lastSeenAnnouncementId = useStorage('last-seen-announcement-id', 1);
// distance in meters
export const neighboursMaxDistance = useStorage('neighbors-distance', null);
// device info ranges
export const deviceMetricsTimeRange = useStorage('device-metrics-range', '3d');
export const powerMetricsTimeRange = useStorage('power-metrics-range', '3d');
export const environmentMetricsTimeRange = useStorage('environment-metrics-range', '3d');
// map config
export const enabledOverlayLayers = useStorage('enabled-overlay-layers', ['Legend', 'Position History']);
export const selectedTileLayerName = useStorage('selected-tile-layer', 'OpenStreetMap');