import { PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { TextGradientConfig } from './index'
import cloneDeep from 'lodash/cloneDeep'


export enum FontWeightEnum {
  NORMAL = '常规',
  BOLD = '加粗',
}

export enum FontStyleEnum {
  NORMAL = '常规',
  ITALIC = '斜体',
}

export const FontWeightObject = {
  [FontWeightEnum.NORMAL]: 'normal',
  [FontWeightEnum.BOLD]: 'bold',
}

export const FontStyleObject = {
  [FontStyleEnum.NORMAL]: 'normal',
  [FontStyleEnum.ITALIC]: 'italic',
}

export const option = {
  dataset: '我是渐变文本',
  size: 20,
  weight: 'normal',
  fontStyle: 'normal',
  gradient: {
    from: '#0000FFFF',
    to: '#00FF00FF',
    deg: 45
  }
}

export default class Config extends PublicConfigClass implements CreateComponentType {
  public key = TextGradientConfig.key
  public chartConfig = cloneDeep(TextGradientConfig)
  public option = cloneDeep(option)
}
