import { IModel , getProp , _unprotectAndRemoveItem } from "@esri/hub-common" ; import { IUserRequestOptions } from "@esri/arcgis-rest-auth" ; param { Object } siteModel param { IRequestOptions } requestOptions private export function _removeParentInitiative ( siteModel , requestOptions ) { const parentInitiativeId = getProp ( siteModel , "item.properties.parentInitiativeId" ) ; if ( parentInitiativeId ) { const opts = Object . assign ( { id : parentInitiativeId , owner : siteModel . item . owner } , requestOptions ) ; return _unprotectAndRemoveItem ( opts ) ; } else { return Promise . resolve ( ) ; } }