import { createPinia }          from 'pinia';
import { createPersistedState } from 'pinia-plugin-persistedstate';


const persistedState = createPersistedState({
  key: (storeKey) => `${ import.meta.env.SIX_APP_NAME ?? '@six/unknown' }:${ storeKey }`,
  auto: true,
  debug: import.meta.env.DEV,
});

const pinia = createPinia();
pinia.use(persistedState);

export default pinia;
export { useAccountStore }      from './account.store';
