import county from './county';
const countyCollection = function countyCollection(data) {
  const {
    id,
    counties
  } = data;
  const contestId = `contest:${id}`;
  const formattedCounties = counties.map(ru => county(ru, contestId));
  return {
    id: contestId,
    counties: formattedCounties
  };
};
export default countyCollection;