import { IModel , getProp , interpolate , IModelTemplate } from "@esri/hub-common" ; param { object } siteModel param { object } pageModel private export function _secondPassAdlibPages ( siteModel , pageModel ) { const teams = [ "collaborationGroupId" , "followersGroupId" , "contentGroupId" ] . reduce ( ( acc , prop ) => { const teamId = getProp ( siteModel , `item.properties.${ prop }` ) ; if ( teamId ) { acc [ prop ] = teamId ; } return acc ; } , { } as any ) ; const settings = { teams , siteId : getProp ( siteModel , "item.id" ) , siteUrl : getProp ( siteModel , "item.url" ) , initiative : { item : { id : getProp ( siteModel , "item.properties.parentInitiativeId" ) } } } ; settings [ siteModel . key ] = siteModel ; return interpolate ( pageModel , settings ) ; }