import { defineStore } from 'pinia'

/**
 * 布局配置
 * 修改配置时：
 * 1、需要每次都清理 `window.localStorage` 浏览器永久缓存
 * 2、或者点击布局配置最底部 `一键恢复默认` 按钮即可看到效果
 */
export const useThemeConfig = defineStore('themeConfig', {
  state: (): ThemeConfigState => ({
    themeConfig: {"isDrawer":false,"isCreateWebHistory":true,"primary":"#0A2BBC","isIsDark":false,"topBar":"#FFFFFF","topBarColor":"#606266","isTopBarColorGradual":false,"menuBar":"#FFFFFF","menuBarColor":"#606266","menuBarActiveColor":"#e6e9f8","isMenuBarColorGradual":false,"columnsMenuBar":"#FFFFFF","columnsMenuBarColor":"#606266","columnsMenuBarActiveColor":"#ffffff","isColumnsMenuBarColorGradual":false,"isColumnsMenuHoverPreload":false,"isCollapse":false,"isUniqueOpened":true,"isFixedHeader":true,"isFixedHeaderChange":false,"isClassicSplitMenu":true,"isLockScreen":false,"lockScreenTime":30,"isShowLogo":true,"isShowLogoChange":false,"isBreadcrumb":true,"isTagsview":true,"isBreadcrumbIcon":false,"isTagsviewIcon":false,"isCacheTagsView":true,"isSortableTagsView":true,"isShareTagsView":false,"isFooter":false,"isGrayscale":false,"isInvert":false,"isWatermark":false,"watermarkText":"IMES-Cloud","tagsStyle":"tags-style-five","animation":"opacitys","columnsAsideStyle":"columns-round","columnsAsideLayout":"columns-vertical","layout":"columns","isRequestRoutes":true,"globalTitle":"IMES-Cloud","globalViceTitle":"IMES-Cloud","globalViceTitleMsg":"IMES-Cloud 数字化生产平台","globalI18n":"zh-cn","globalComponentSize":"default"},
  }),
  actions: {
    setThemeConfig(data: ThemeConfigState) {
      this.themeConfig = data.themeConfig
    },
  },
})
