"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[13229],{13229:(t,e,n)=>{n.r(e),n.d(e,{CoreSitePluginsCallWSNewContentDirective:()=>d});var s=n(15324),o=n(91768),i=n(84851),a=n(32832),r=n(91416),l=n(54438),c=n(46526);let d=(()=>{var t;class CoreSitePluginsCallWSNewContentDirective extends i.y{constructor(t,e){super(t,e),this.samePage=!1,this.ptrEnabled=!0}wsCallSuccess(t){let e=this.args||{};this.parentContent&&(e=a.CoreSitePlugins.loadOtherDataInArgs(this.args,this.parentContent.otherData,this.useOtherData)),e=Object.assign(e,t);let n=this.jsData||{};var i;!0===n&&(n=(null===(i=this.parentContent)||void 0===i?void 0:i.data)||{});if(this.samePage){var r;null===(r=this.parentContent)||void 0===r||r.updateContent(e,this.component,this.method,n,this.newContentPreSets)}else{var l,c,d,u,h,p,v,C,g,m,S;const t=this.component||(null===(l=this.parentContent)||void 0===l?void 0:l.component),i=this.method||(null===(c=this.parentContent)||void 0===c?void 0:c.method),a=o.VV.hashAsciiStr(JSON.stringify(e));s.CoreNavigator.navigateToSitePath(`siteplugins/content/${t}/${i}/${a}`,{params:{title:this.title||(null===(d=this.parentContent)||void 0===d?void 0:d.pageTitle),args:e,initResult:null===(u=this.parentContent)||void 0===u?void 0:u.initResult,jsData:n,preSets:this.newContentPreSets,ptrEnabled:this.ptrEnabled,contextLevel:null!==(h=this.contextLevel)&&void 0!==h?h:null===(p=this.parentContent)||void 0===p?void 0:p.contextLevel,contextInstanceId:null!==(v=this.contextInstanceId)&&void 0!==v?v:null===(C=this.parentContent)||void 0===C?void 0:C.contextInstanceId,courseId:null!==(g=null!==(m=this.courseId)&&void 0!==m?m:null===(S=this.parentContent)||void 0===S?void 0:S.courseId)&&void 0!==g?g:e.courseid}})}}}return(t=CoreSitePluginsCallWSNewContentDirective).ɵfac=function CoreSitePluginsCallWSNewContentDirective_Factory(e){return new(e||t)(l.rXU(l.aKT),l.rXU(c.U,8))},t.ɵdir=l.FsC({type:t,selectors:[["","core-site-plugins-call-ws-new-content",""]],inputs:{component:"component",method:"method",args:"args",title:"title",samePage:[l.Mj6.HasDecoratorInputTransform,"samePage","samePage",r.G],useOtherData:"useOtherData",form:"form",jsData:"jsData",newContentPreSets:"newContentPreSets",contextLevel:"contextLevel",contextInstanceId:"contextInstanceId",courseId:"courseId",ptrEnabled:[l.Mj6.HasDecoratorInputTransform,"ptrEnabled","ptrEnabled",r.G]},standalone:!0,features:[l.GFd,l.Vt3]}),CoreSitePluginsCallWSNewContentDirective})()}}]);