import { AutoLayout } from "../../../layout/index.js";
import { getStateName } from "../../../../utils/election/index.js";
import { intcomma } from 'journalize';
import cx from "../../../../utils/css/cx.js";
import classes from './styles.module.scss';
const cls = cx.merge(classes);
export default function StateTooltip({
  delegate
}) {
  return <AutoLayout gap="0" padding="0">
      <span className={cls('state-label')}>
        {getStateName(delegate.stateFips)}
      </span>
      <span className={cls('state-del')}>
        {intcomma(delegate.total)}
        {' delegates'}
      </span>
    </AutoLayout>;
}