import type { ThemeConfig } from "./ThemeDefine";

/** 默认主题配置 */
export const DefaultTheme : ThemeConfig = {
  varOverrides: {
    spaceSize: {
      xs: '10rpx',
      sm: '15rpx',
      md: '20rpx',
      lg: '30rpx',
    },
    fontSize: {
      mini: 22,
      small: 26,
      medium: 30,
      large: 38,
      larger: 46,
    },
    shadow: {
      default: '0 0 10px rgba(0, 0, 0, 0.1)',
      light: '0 0 10px rgba(0, 0, 0, 0.05)',
      dark: '0 0 10px rgba(0, 0, 0, 0.2)',
      none: 'none',
    },
    border: {
      default: '1px solid #dddddd',
      none: 'none',
    },
  },
  colorConfigs: {
    default: {
      default: 'transparent',
      button: '#dddddd',
      lightButton: '#ffffff',
      primary: '#007AFF',
      secondary: '#0462C7',
      success: '#4CAF50',
      info: '#2196F3',
      warning: '#FFC107',
      danger: '#F44336',
      notice: '#ffffff',
      light: '#F5F5F5',
      dark: '#212121',
      white: '#FFFFFF',
      black: '#000000',
      grey: '#999999',
      lightGrey: '#c3c3c3',
      darkGrey: '#8e8e8e',
      skeleton: 'rgba(46,50,56, 0.05)',
    },
    pressed: {
      default: 'rgba(0,0,0,0.35)',
      white: '#e7e7e7',
      black: '#666666',
      grey: '#aaaaaa',
      primary: '#0960ac',
      success: '#278950',
      warning: '#dd8700',
      info: '#0960ac',
      notice: '#dddddd',
      danger: '#d70920',
    },
    mask: {
      default: 'rgba(0, 0, 0, 0.3)',
      white: 'rgba(250, 250, 250, 0.8)',
      primary: 'rgba(9, 96, 172, 0.2)',
      info: 'rgba(33, 150, 243, 0.2)',
      success: 'rgba(39, 137, 80, 0.3)',
      warning: 'rgba(221, 135, 0, 0.2)',
      danger: 'rgba(215, 9, 32, 0.2)',
    },
    background: {
      page: '#f8f8f8',
      primary: '#eff2ff',
      success: '#e0f6de',
      warning: '#FEECD2',
      danger: '#fff0f0',
      info: '#eff2ff',
      imageBox: '#dfdfdf',
      cell: '#ffffff',
      bar: '#f8f8f8',
      box: '#dadada',
      switch: '#dadada',
      notify: '#f8f8f8',
      toast: 'rgba(0, 0, 0, 0.85)',
      mask: 'rgba(0, 0, 0, 0.6)',
    },
    text: {
      title: '#000000',
      light: '#ffffff',
      content: '#333333',
      second: '#999999',
      link: '#007AFF',
      info: '#007AFF',
      primary: '#014D8E',
      success: '#2EA200',
      warning: '#D87001',
      danger: '#BE0405',
    },
    border: {
      input: '#dadada',
      default: '#dddddd',
      cell: '#efefef',
      light: '#eeeeee',
    },
  },
  textConfigs: {
    h1: {
      color: 'text.title',
      fontSize: '50px',
      fontWeight: 'bold',
    },
    h2: {
      color: 'text.title',
      fontSize: '45rpx',
      fontWeight: 'bold',
    },
    h3: {
      color: 'text.title',
      fontSize: '40rpx',
      fontWeight: 'bold',
    },
    h4: {
      color: 'text.title',
      fontSize: '36rpx',
      fontWeight: 'bold',
    },
    h5: {
      color: 'text.title',
      fontSize: '30rpx',
      fontWeight: 'bold',
    },
    h6: {
      color: 'text.title',
      fontSize: '26rpx',
      fontWeight: 'bold',
    },
    content: {
      color: 'text.content',
      fontSize: '24rpx',
    },
    subTitle: {
      color: 'text.content',
      fontSize: '34rpx',
    },
    subText: {
      color: 'text.content',
      fontSize: '26rpx',
    },
    subSecondText: {
      color: 'text.second',
      fontSize: '26rpx',
    },
    footerText: {
      color: 'text.second',
      fontSize: '24rpx',
    },
  }
}

/** 默认暗黑主题配置 */
export const DefaultDarkTheme = {
  ...DefaultTheme,
  colorConfigs: {
    ...DefaultTheme.colorConfigs,
    default: {
      ...DefaultTheme.colorConfigs.default,
      button: '#666666',
      lightButton: '#333333',
      notice: '#000000',
      light: '#3e3e3e',
      dark: '#eeeeee',
      white: '#000000',
      black: '#ffffff',
      grey: '#666666',
      lightGrey: '#3d3d3d',
      darkGrey: '#727272',
      skeleton: 'rgba(255,255,255,0.1)',
    },
    pressed: {
      ...DefaultTheme.colorConfigs.pressed,
      default: 'rgba(255,255,255,0.1)',
      white: '#181818',
      black: '#999999',
      grey: '#555555',
      notice: '#222222',
    },
    mask: {
      ...DefaultTheme.colorConfigs.mask,
      default: 'rgba(0, 0, 0, 0.5)',
      white: 'rgba(250, 250, 250, 0.9)',
      primary: 'rgba(9, 96, 172, 0.3)',
      info: 'rgba(33, 150, 243, 0.3)',
      success: 'rgba(39, 137, 80, 0.4)',
      warning: 'rgba(221, 135, 0, 0.3)',
      danger: 'rgba(215, 9, 32, 0.3)',
    },
    background: {
      ...DefaultTheme.colorConfigs.background,
      page: '#1a1a1a',
      imageBox: '#202020',
      cell: '#000000',
      bar: '#1a1a1a',
      box: '#252525',
      switch: '#252525',
      notify: '#1a1a1a',
      toast: 'rgba(0, 0, 0, 0.95)',
      mask: 'rgba(0, 0, 0, 0.8)',
      primary: 'rgba(0, 122, 255, 0.2)',
      success: 'rgba(76, 175, 80, 0.2)',
      warning: 'rgba(255, 193, 7, 0.2)',
      danger: 'rgba(244, 67, 54, 0.2)',
      info: 'rgba(33, 150, 243, 0.2)',
    },
    text: {
      ...DefaultTheme.colorConfigs.text,
      title: '#ffffff',
      light: '#000000',
      content: '#cccccc',
      second: '#666666',
    },
    border: {
      ...DefaultTheme.colorConfigs.border,
      input: '#252525',
      default: '#333333',
      cell: '#333333',
      light: '#444444',
    },
  },
}