import { writable } from 'svelte/store'
import { useLocation } from "svelte-navigator";

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 });
export const storePermisos = writable([]);
export const storePermisoApp = writable({});

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