import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import { user } from './user'
import { search } from './search'

const store = createPinia()
store.use(piniaPluginPersistedstate)

export default store

export const useStore = () => {
  return {
    user: user(),
    search: search()
  }
}
