//#region src/canonical.ts
function getCanonicalOrigin(tenant) {
	if (tenant.customDomain) return `https://${tenant.customDomain}`;
	return `https://${tenant.subdomain}.${tenant.baseDomain}`;
}
function buildLocaleUrl(origin, locale, path) {
	const normalizedOrigin = origin.replace(/\/$/, "");
	const normalizedPath = path.startsWith("/") ? path : `/${path}`;
	return `${normalizedOrigin}${locale ? `/${locale}` : ""}${normalizedPath}`;
}
//#endregion
export { buildLocaleUrl, getCanonicalOrigin };
