var testFollowTheme = false
export const getShadowConfig = (properties, theme) => {
  let {
    custom: {
      shadowB,
      shadowX,
      shadowY,
      shadowColor
    },
    isFollowTheme
  } = properties

  if (!testFollowTheme && isFollowTheme) {
    shadowB = 0
    shadowX = 0
    shadowY = 0
    if (theme && Object.keys(theme).length !== 0 && !!theme.css.variables) {
      const { css: { variables } } = theme
      shadowColor = variables['--dp-text-primary'] ? variables['--dp-text-primary'] : '#000'
    }
    testFollowTheme = true
  }

  if (shadowB == 0 && shadowX == 0 && shadowY == 0) {
    return 'none'
  }

  return `drop-shadow(${shadowX}px ${shadowY}px ${shadowB}px ${shadowColor})`
}