import { useWeAppAuthStore } from '../store/useWeAppAuthStore'

const auth = useWeAppAuthStore()
export function getStyleBgInfo() {
  let style: any = auth?.data?.config?.companyConfig?.config_value
  let color = style?.color
  return {
    backgroundColor: color || '#0082fa',
    border: '1rpx solid ' + (color || '#0082fa'),
    color: '#fff'
  }
}

export function getStyleColorInfo() {
  let style: any = auth?.data?.config?.companyConfig?.config_value
  let color = style?.color
  return {
    color: color || '#0082fa'
  }
}

export function getBorderColorInfo() {
  let style: any = auth?.data?.config?.companyConfig?.config_value
  let color = style?.color
  return {
    color: color || '#0082fa',
    border: '1rpx solid ' + (color || '#0082fa'),
  }
}

export function getStyleColorValueInfo() {
  let style: any = auth?.data?.config?.companyConfig?.config_value
  let color = style?.color
  return color || '#0082fa'
}

export function getStyleBgGradientInfo() {
  //获取渐变色
  let style: any = auth?.data?.config?.companyConfig?.config_value
  return {
    background: style?.pageColor
  }
}
