import { type LayoutSetting } from '@/store/modules/layoutSetting';
import { theme } from 'ant-design-vue';

const { defaultAlgorithm, darkAlgorithm } = theme;

export const themeStyle = [
  {
    label: '亮色主题风格',
    value: 'light',
  },
  {
    label: '暗色主题风格',
    value: 'dark',
  },
  {
    label: '暗黑模式',
    value: 'realDark',
  },
] as const;

/** 主题色 */
export const themeColor = {
  light: defaultAlgorithm,
  dark: defaultAlgorithm,
  realDark: darkAlgorithm,
} as const;
export type ThemeColor = keyof typeof themeColor;
export const defaultSetting: LayoutSetting = {
  navTheme: 'light', // theme for nav menu
  colorPrimary: '#deae35', // '#F5222D', // primary color of ant design
  layout: 'sidemenu', // nav menu position: `sidemenu` or `topmenu`
  contentWidth: 'Fluid', // layout of content: `Fluid` or `Fixed`, only works when layout is topmenu
  fixedHeader: false, // sticky header
  fixSiderbar: false, // sticky siderbar
  colorWeak: false,
  menu: {
    locale: true,
  },
  title: 'vite-antdv-admin',
  pwa: false,
  iconfontUrl: '',
  // production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true',
};
/** 主题色 */
export const themeColors = [
  {
    title: '山矿主题（默认）',
    key: 'primary',
    value: defaultSetting.colorPrimary,
  },
  {
    title: '薄暮',
    key: 'dust',
    value: '#F5222D',
  },
  {
    title: '火山',
    key: 'volcano',
    value: '#FA541C',
  },
  {
    title: '日暮',
    key: 'sunset',
    value: '#FAAD14',
  },
  {
    title: '明青',
    key: 'cyan',
    value: '#13C2C2',
  },
  {
    title: '极光绿',
    key: 'green',
    value: '#52C41A',
  },
  {
    title: '极客蓝',
    key: 'geekblue',
    value: '#2F54EB',
  },
  {
    title: '酱紫',
    key: 'purple',
    value: '#722ED1',
  },
] as const;

/** 导航模式（布局方式） */
export const layouts = [
  {
    label: '侧边菜单布局',
    value: 'sidemenu',
  },
  {
    label: '顶部菜单布局',
    value: 'topmenu',
  },
] as const;
