import useToolsWithEmailsSent from '@/analyst/dataHooks/useToolsWithEmailsSent'
import { scaleOrdinal } from 'd3-scale'
import { schemeDark2 } from 'd3-scale-chromatic'

const useToolsWithEmailsSentColor = () => {
  const toolsWithEmailsSent = useToolsWithEmailsSent()

  return scaleOrdinal(schemeDark2).domain(
    toolsWithEmailsSent.map(tool => tool.name)
  )
}

export default useToolsWithEmailsSentColor
