import { useCandidateMetadata } from "../../../../hooks/election/index.js";
import getColor from "../../../../utils/colors/getColor.js";
import getElectionPaletteColor from "../../../../utils/colors/getElectionPaletteColor.js";
import cx from "../../../../utils/css/cx.js";
import classes from './styles.module.scss';
const cls = cx.merge(classes);
export default function Dot({
  data
}) {
  const meta = useCandidateMetadata(data);
  const color = getElectionPaletteColor(meta?.customColor);
  return <div className={cls('dot')} style={{
    '--cand-color': getColor(color)
  }} />;
}