import * as Pinia from 'pinia'
import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化

const store = Pinia.createPinia()
store.use(
  createPersistedState({
    storage: {
      getItem: uni.getStorageSync,
      setItem: uni.setStorageSync,
    },
  }),
)

export { Pinia, store }

// 模块统一导出
export * from './module/user'
export * from './module/search'
export * from './module/config'
