// store/index.ts
import { createPinia } from 'pinia'
import persistedstate from 'pinia-plugin-persistedstate'
import type { App } from 'vue'

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

export function setupStore(app: App) {
  app.use(store)
}

export { store }

// 统一聚合导出
export * from './modules/common'
export * from './modules/user'
