import cx from "../../../../../../utils/css/cx.js";
import getStateName from "../../../../../../utils/election/getStateName/index.js";
import classes from './styles.module.scss';
const cls = cx.merge(classes);
const Label = function Label(props) {
  const {
    scales,
    chartId,
    fips,
    end
  } = props;
  const {
    x,
    yInner
  } = scales;
  return <text id={`${chartId}-${fips}-label`} className={cls('label', end.party)} key={fips} x={x(end.value)} y={yInner(end.year) + 10 + 14} textAnchor="middle" dominantBaseline="top">
      {getStateName(fips, {
      format: 'abbr'
    })}
    </text>;
};
export default Label;