"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[29905],{29905:(n,e,o)=>{o.r(e),o.d(e,{AddonModAssignFeedbackPluginComponent:()=>k});var i=o(10467),t=o(68162),d=o(5505),s=o(20218),a=o(62007),p=o(66016),l=o(91416),g=o(86654),c=o(54438),m=o(60177),u=o(2910),r=o(6128),_=o(64422),f=o(58197),A=o(35407),b=o(73955);function AddonModAssignFeedbackPluginComponent_ion_item_2_ion_badge_4_Template(n,e){1&n&&(c.j41(0,"ion-badge",7),c.EFF(1),c.nI1(2,"translate"),c.k0s()),2&n&&(c.R7$(),c.SpI(" ",c.bMT(2,1,"addon.mod_assign.feedbacknotsupported")," "))}function AddonModAssignFeedbackPluginComponent_ion_item_2_p_5_Template(n,e){if(1&n&&(c.j41(0,"p"),c.nrm(1,"core-format-text",8),c.k0s()),2&n){const n=c.XpG(2);c.R7$(),c.Y8G("component",n.component)("componentId",n.assign.cmid)("text",n.text)("contextInstanceId",n.assign.cmid)("courseId",n.assign.course)}}function AddonModAssignFeedbackPluginComponent_ion_item_2_core_file_6_Template(n,e){if(1&n&&c.nrm(0,"core-file",9),2&n){const n=e.$implicit,o=c.XpG(2);c.Y8G("file",n)("component",o.component)("componentId",o.assign.cmid)("alwaysDownload",!0)}}function AddonModAssignFeedbackPluginComponent_ion_item_2_Template(n,e){if(1&n&&(c.j41(0,"ion-item",3)(1,"ion-label")(2,"h2"),c.EFF(3),c.k0s(),c.DNE(4,AddonModAssignFeedbackPluginComponent_ion_item_2_ion_badge_4_Template,3,3,"ion-badge",4)(5,AddonModAssignFeedbackPluginComponent_ion_item_2_p_5_Template,2,5,"p",5)(6,AddonModAssignFeedbackPluginComponent_ion_item_2_core_file_6_Template,1,4,"core-file",6),c.k0s()()),2&n){const n=c.XpG();c.R7$(3),c.JRh(n.plugin.name),c.R7$(),c.Y8G("ngIf",n.notSupported),c.R7$(),c.Y8G("ngIf",n.text),c.R7$(),c.Y8G("ngForOf",n.files)}}let k=(()=>{var n;class AddonModAssignFeedbackPluginComponent{constructor(){this.canEdit=!1,this.edit=!1,this.component=p.It,this.text="",this.files=[],this.notSupported=!1,this.pluginLoaded=!1}ngOnInit(){var n=this;return(0,i.A)((function*(){if(!n.plugin)return n.pluginLoaded=!0,void 0;const e=a.AddonModAssignFeedbackDelegate.getPluginName(n.plugin);if(!e)return n.pluginLoaded=!0,void 0;n.plugin.name=e,n.pluginComponent=yield a.AddonModAssignFeedbackDelegate.getComponentForPlugin(n.plugin),n.pluginComponent?n.data={assign:n.assign,submission:n.submission,plugin:n.plugin,userId:n.userId,configs:s.AddonModAssignHelper.getPluginConfig(n.assign,"assignfeedback",n.plugin.type),edit:n.edit,canEdit:n.canEdit}:(n.text=d.AddonModAssign.getSubmissionPluginText(n.plugin),n.files=d.AddonModAssign.getSubmissionPluginAttachments(n.plugin),n.notSupported=a.AddonModAssignFeedbackDelegate.isPluginSupported(n.plugin.type),n.pluginLoaded=!0)}))()}invalidate(){var n=this;return(0,i.A)((function*(){yield n.dynamicComponent.callComponentMethod("invalidate")}))()}}return(n=AddonModAssignFeedbackPluginComponent).ɵfac=function AddonModAssignFeedbackPluginComponent_Factory(e){return new(e||n)},n.ɵcmp=c.VBU({type:n,selectors:[["addon-mod-assign-feedback-plugin"]],viewQuery:function AddonModAssignFeedbackPluginComponent_Query(n,e){if(1&n&&c.GBs(t.m,5),2&n){let n;c.mGM(n=c.lsd())&&(e.dynamicComponent=n.first)}},inputs:{assign:"assign",submission:"submission",plugin:"plugin",userId:"userId",canEdit:[c.Mj6.HasDecoratorInputTransform,"canEdit","canEdit",l.G],edit:[c.Mj6.HasDecoratorInputTransform,"edit","edit",l.G]},standalone:!0,features:[c.GFd,c.aNF],decls:3,vars:4,consts:[[3,"component","data"],[3,"hideUntil"],["class","ion-text-wrap",4,"ngIf"],[1,"ion-text-wrap"],["color","primary",4,"ngIf"],[4,"ngIf"],[3,"file","component","componentId","alwaysDownload",4,"ngFor","ngForOf"],["color","primary"],["collapsible-item","","contextLevel","module",3,"component","componentId","text","contextInstanceId","courseId"],[3,"file","component","componentId","alwaysDownload"]],template:function AddonModAssignFeedbackPluginComponent_Template(n,e){1&n&&(c.j41(0,"core-dynamic-component",0)(1,"core-loading",1),c.DNE(2,AddonModAssignFeedbackPluginComponent_ion_item_2_Template,7,4,"ion-item",2),c.k0s()()),2&n&&(c.Y8G("component",e.pluginComponent)("data",e.data),c.R7$(),c.Y8G("hideUntil",e.pluginLoaded),c.R7$(),c.Y8G("ngIf",e.text.length>0||e.files.length>0))},dependencies:[g.n,m.Sq,m.bT,u.In,u.uz,u.he,t.m,r.t,_.R,f.B,A.K,b.D9],encapsulation:2}),AddonModAssignFeedbackPluginComponent})()}}]);