import { StatesGeo, ElectoralVotes } from "../../maps/index.js";
import { useGetMapFills, useGetMapLabelProps } from "../../../hooks/election/index.js";
const NationalElectoralMap = function NationalElectoralMap(props) {
  const {
    colors,
    format,
    tooltip,
    ...restProps
  } = props;
  const getFillProps = useGetMapFills(colors, format);
  const getLabelProps = useGetMapLabelProps(colors, format);
  const Map = format === 'geo' ? StatesGeo : ElectoralVotes;
  return <Map getBoundaryProps={getFillProps} getLabelProps={getLabelProps} tooltip={tooltip} labelStyle="abbr" {...restProps} />;
};
export default NationalElectoralMap;