"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[80024],{80024:(n,t,e)=>{e.r(t),e.d(t,{CoreRatingRatingsComponent:()=>I});var o=e(10467),i=e(86654),a=e(87326),s=e(25572),r=e(79555),l=e(54438),g=e(60177),c=e(2910),m=e(16986),_=e(64422),p=e(16658),R=e(86198),d=e(88246),C=e(43570),u=e(73955),f=e(2423);function CoreRatingRatingsComponent_ion_list_12_ion_item_1_ion_note_7_Template(n,t){if(1&n&&(l.j41(0,"ion-note",0),l.EFF(1),l.nI1(2,"coreDateDayOrTime"),l.k0s()),2&n){const n=l.XpG().$implicit;l.R7$(),l.SpI(" ",l.bMT(2,1,n.timemodified)," ")}}function CoreRatingRatingsComponent_ion_list_12_ion_item_1_Template(n,t){if(1&n&&(l.j41(0,"ion-item",7),l.nrm(1,"core-user-avatar",8),l.j41(2,"ion-label")(3,"p",9),l.EFF(4),l.k0s(),l.j41(5,"p"),l.EFF(6),l.k0s()(),l.DNE(7,CoreRatingRatingsComponent_ion_list_12_ion_item_1_ion_note_7_Template,3,3,"ion-note",10),l.k0s()),2&n){const n=t.$implicit,e=l.XpG(2);l.R7$(),l.Y8G("user",n)("courseId",e.courseId),l.R7$(3),l.JRh(n.userfullname),l.R7$(2),l.JRh(n.rating),l.R7$(),l.Y8G("ngIf",n.timemodified)}}function CoreRatingRatingsComponent_ion_list_12_Template(n,t){if(1&n&&(l.j41(0,"ion-list"),l.DNE(1,CoreRatingRatingsComponent_ion_list_12_ion_item_1_Template,8,5,"ion-item",6),l.k0s()),2&n){const n=l.XpG();l.R7$(),l.Y8G("ngForOf",n.ratings)}}function CoreRatingRatingsComponent_core_empty_box_13_Template(n,t){1&n&&(l.nrm(0,"core-empty-box",11),l.nI1(1,"translate")),2&n&&l.Y8G("message",l.bMT(1,1,"core.rating.noratings"))}let I=(()=>{var n;class CoreRatingRatingsComponent{constructor(){this.loaded=!1,this.ratings=[]}ngOnInit(){var n=this;return(0,o.A)((function*(){try{n.ratings=yield a.CoreRating.getItemRatings(n.contextLevel,n.instanceId,n.ratingComponent,n.ratingArea,n.itemId,n.scaleId,void 0,n.courseId)}catch(n){s.CoreAlerts.showError(n)}finally{n.loaded=!0}}))()}closeModal(){r.W3.dismiss()}}return(n=CoreRatingRatingsComponent).ɵfac=function CoreRatingRatingsComponent_Factory(t){return new(t||n)},n.ɵcmp=l.VBU({type:n,selectors:[["ng-component"]],inputs:{contextLevel:"contextLevel",instanceId:"instanceId",ratingComponent:"ratingComponent",ratingArea:"ratingArea",aggregateMethod:"aggregateMethod",itemId:"itemId",scaleId:"scaleId",courseId:"courseId"},standalone:!0,features:[l.aNF],decls:14,vars:9,consts:[["slot","end"],["fill","clear",3,"click","ariaLabel"],["slot","icon-only","name","fas-xmark","aria-hidden","true"],[3,"hideUntil"],[4,"ngIf"],["icon","fas-star-half-stroke",3,"message",4,"ngIf"],["class","ion-text-wrap",4,"ngFor","ngForOf"],[1,"ion-text-wrap"],["slot","start",3,"user","courseId"],[1,"item-heading"],["slot","end",4,"ngIf"],["icon","fas-star-half-stroke",3,"message"]],template:function CoreRatingRatingsComponent_Template(n,t){1&n&&(l.j41(0,"ion-header")(1,"ion-toolbar")(2,"ion-title")(3,"h1"),l.EFF(4),l.nI1(5,"translate"),l.k0s()(),l.j41(6,"ion-buttons",0)(7,"ion-button",1),l.nI1(8,"translate"),l.bIt("click",(function CoreRatingRatingsComponent_Template_ion_button_click_7_listener(){return t.closeModal()})),l.nrm(9,"ion-icon",2),l.k0s()()()(),l.j41(10,"ion-content")(11,"core-loading",3),l.DNE(12,CoreRatingRatingsComponent_ion_list_12_Template,2,1,"ion-list",4)(13,CoreRatingRatingsComponent_core_empty_box_13_Template,2,3,"core-empty-box",5),l.k0s()()),2&n&&(l.R7$(4),l.JRh(l.bMT(5,5,"core.rating.ratings")),l.R7$(3),l.Y8G("ariaLabel",l.bMT(8,7,"core.close")),l.R7$(4),l.Y8G("hideUntil",t.loaded),l.R7$(),l.Y8G("ngIf",t.ratings.length>0),l.R7$(),l.Y8G("ngIf",0===t.ratings.length))},dependencies:[i.n,g.Sq,g.bT,c.Jm,c.QW,c.W9,c.eU,c.iq,c.uz,c.he,c.nf,c.JI,c.BC,c.ai,m.h,_.R,p.T,R.t,d.i,C.T,u.D9,f.Y],encapsulation:2}),CoreRatingRatingsComponent})()}}]);