import { IPortal } from "@esri/arcgis-rest-portal" ; import { getPortalSiteHostname } from "./get-portal-site-hostname" ; param { String } subdomain param { Object } portal export function getPortalSiteUrl ( subdomain , portal ) { let protocol = "http:" ; if ( portal . allSSL ) { protocol = "https:" ; } const siteRoute = getPortalSiteHostname ( subdomain , portal ) ; return `${ protocol }//${ siteRoute }` ; }