import { IModelTemplate , IHubRequestOptions , getProp } from "@esri/hub-common" ; import { getDefaultInitiativeTemplate } from "./get-default-initiative-template" ; param { object } siteTemplate param { IHubRequestOptions } hubRequestOptions export function getInitiativeTemplate ( siteTemplate , hubRequestOptions ) { let tmplPromise ; const template = getProp ( siteTemplate , "properties.initiativeTemplate" ) ; if ( template ) { tmplPromise = Promise . resolve ( template ) ; } else { tmplPromise = getDefaultInitiativeTemplate ( hubRequestOptions ) ; } return tmplPromise ; }