import type { App } from "vue";
import { createPinia } from "pinia";
import { createPersistedState } from 'pinia-plugin-persistedstate'
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
const store = createPinia();
store.use(piniaPluginPersistedstate);
store.use(
  createPersistedState({
    storage: localStorage,
  })
);
export function setupStore(app: App<Element>) {
  app.use(store);
}

export { store };
