// @svizzle/time_region_value v0.5.0 - © 2021 nestauk (https://www.nesta.org.uk/)
'use strict';

var format = require('./format-a62f401a.js');

const makeURL = (base, id, year) => {
	let url = year
		? `${base}/${id}/${year}`
		: `${base}/${id}`;
	if (format.isClientSide) {
		const {protocol, host} = location;
		url = new URL(url, `${protocol}//${host}`).toString();
	}
	return url;
};

exports.makeURL = makeURL;
