import { writable } from 'svelte/store'

const cacheParaderos = JSON.parse(sessionStorage.getItem('cache-paraderos') || 'null') || null;

export const storeMessages = writable([]);
export const storeParaderos = writable(cacheParaderos);
export const storeSession = writable({});
export const storeLayout = writable({ showSidebar: true });

storeParaderos.subscribe(val => sessionStorage.setItem('cache-paraderos', JSON.stringify(val)))