"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[25117],{25117:(e,t,a)=>{a.r(t),a.d(t,{CoreDataPrivacyContactDPOComponent:()=>v});var o=a(10467),n=a(86654),r=a(89417),i=a(8398),s=a(98870),c=a(52749),l=a(47551),m=a(55554),d=a(79555),p=a(33014),C=a(25572),u=a(54438),f=a(60177),g=a(2910),b=a(17778),_=a(86198),D=a(88246),y=a(43570),P=a(73955);function CoreDataPrivacyContactDPOComponent_ion_item_12_Template(e,t){if(1&e&&(u.j41(0,"ion-item")(1,"ion-label")(2,"p",9),u.EFF(3),u.nI1(4,"translate"),u.k0s(),u.j41(5,"p"),u.EFF(6),u.k0s()()()),2&e){const e=u.XpG();u.R7$(3),u.SpI(" ",u.bMT(4,2,"core.dataprivacy.replyto")," "),u.R7$(3),u.JRh(e.email)}}let v=(()=>{var e;class CoreDataPrivacyContactDPOComponent{constructor(e){this.fb=e,this.message="",this.email="",this.form=new r.gE({}),this.form.addControl("message",this.fb.control("",r.k0.required))}ngOnInit(){var e=this;return(0,o.A)((function*(){const t=yield p.CoreLoadings.show(),a=c.CoreSites.getCurrentSiteUserId(),o=yield m.g.ignoreErrors(s.CoreUser.getProfile(a));e.email=(null==o?void 0:o.email)||"",t.dismiss()}))()}send(e){var t=this;return(0,o.A)((function*(){e.preventDefault(),e.stopPropagation();const a=yield p.CoreLoadings.show();try{(yield i.CP.contactDPO(t.message))&&(l.CoreToasts.show({message:"core.dataprivacy.requestsubmitted",translateMessage:!0,duration:l.ToastDuration.LONG}),d.W3.dismiss(!0))}catch(e){C.CoreAlerts.showError(e,{default:"Error sending data privacy request"})}finally{a.dismiss()}}))()}close(){d.W3.dismiss()}}return(e=CoreDataPrivacyContactDPOComponent).ɵfac=function CoreDataPrivacyContactDPOComponent_Factory(t){return new(t||e)(u.rXU(r.ok))},e.ɵcmp=u.VBU({type:e,selectors:[["core-data-privacy-contact-dpo"]],standalone:!0,features:[u.aNF],decls:23,vars:21,consts:[["slot","end"],["fill","clear",3,"click","ariaLabel"],["slot","icon-only","name","fas-xmark","aria-hidden","true"],["name","contactDPO",3,"ngSubmit","formGroup"],[4,"ngIf"],["labelPlacement","floating","rows","5","name","text","formControlName","message",3,"ngModelChange","placeholder","ngModel","required"],["slot","label",3,"core-mark-required"],["slot","fixed",1,"ion-padding"],["expand","block",3,"click","disabled"],[1,"item-heading"]],template:function CoreDataPrivacyContactDPOComponent_Template(e,t){1&e&&(u.j41(0,"ion-header")(1,"ion-toolbar")(2,"ion-title")(3,"h1"),u.EFF(4),u.nI1(5,"translate"),u.k0s()(),u.j41(6,"ion-buttons",0)(7,"ion-button",1),u.nI1(8,"translate"),u.bIt("click",(function CoreDataPrivacyContactDPOComponent_Template_ion_button_click_7_listener(){return t.close()})),u.nrm(9,"ion-icon",2),u.k0s()()()(),u.j41(10,"ion-content")(11,"form",3),u.bIt("ngSubmit",(function CoreDataPrivacyContactDPOComponent_Template_form_ngSubmit_11_listener(e){return t.send(e)})),u.DNE(12,CoreDataPrivacyContactDPOComponent_ion_item_12_Template,7,4,"ion-item",4),u.j41(13,"ion-item")(14,"ion-textarea",5),u.nI1(15,"translate"),u.mxI("ngModelChange",(function CoreDataPrivacyContactDPOComponent_Template_ion_textarea_ngModelChange_14_listener(e){return u.DH7(t.message,e)||(t.message=e),e})),u.j41(16,"div",6),u.EFF(17),u.nI1(18,"translate"),u.k0s()()()()(),u.j41(19,"ion-footer",7)(20,"ion-button",8),u.bIt("click",(function CoreDataPrivacyContactDPOComponent_Template_ion_button_click_20_listener(e){return t.send(e)})),u.EFF(21),u.nI1(22,"translate"),u.k0s()()),2&e&&(u.R7$(4),u.JRh(u.bMT(5,11,"core.dataprivacy.contactdataprotectionofficer")),u.R7$(3),u.Y8G("ariaLabel",u.bMT(8,13,"core.close")),u.R7$(4),u.Y8G("formGroup",t.form),u.R7$(),u.Y8G("ngIf",t.email),u.R7$(2),u.FS9("placeholder",u.bMT(15,15,"core.dataprivacy.message")),u.R50("ngModel",t.message),u.Y8G("required",!0),u.R7$(2),u.Y8G("core-mark-required",!0),u.R7$(),u.SpI(" ",u.bMT(18,17,"core.dataprivacy.message")," "),u.R7$(3),u.Y8G("disabled",!t.form.valid),u.R7$(),u.SpI(" ",u.bMT(22,19,"core.dataprivacy.send")," "))},dependencies:[n.n,f.bT,r.qT,r.BC,r.cb,r.YS,g.Jm,g.QW,g.W9,g.M0,g.eU,g.iq,g.uz,g.he,g.nc,g.BC,g.ai,g.Gw,r.j4,r.JD,b.j,_.t,D.i,y.T,P.D9],encapsulation:2}),CoreDataPrivacyContactDPOComponent})()}}]);