import { useContestMetadata } from "../../../../hooks/election/index.js";
import UncontestedRow from '../UncontestedRow';
import RegularRow from '../RegularRow';
const Row = function Row(props) {
  const {
    id,
    candidateId,
    idx
  } = props;
  const metadata = useContestMetadata(id);
  if (!metadata) {
    return null;
  }
  const {
    isUncontested
  } = metadata;
  const Layout = isUncontested ? UncontestedRow : RegularRow;
  return <Layout id={id} candidateId={candidateId} idx={idx} />;
};
export default Row;