import { useTimerStore } from '~~/stores/timer' const storageKeys = { timer: 'timer-settings' } export const storeSettings = () => { const timerSettings = useTimerStore().$state.settings localStorage.setItem(storageKeys.timer, JSON.stringify(timerSettings)) } export const getSettings = () => { const storedSettings = { timer: localStorage.getItem(storageKeys.timer) } if (storedSettings.timer) { useTimerStore().$state.settings = JSON.parse(storedSettings.timer) } }