1"use strict";(self.webpackChunkintershop_pwa=self.webpackChunkintershop_pwa||[]).push([[377],{71308:(L,M,i)=>{i.d(M,{M:()=>O});var a=i(36270),t=i(24164),c=i(53317),d=i(79736),C=i(81891),F=i(27889),N=i(22695);const m=(0,a.ZF)("productNotifications");var y=i(74742);const h=(0,a.P1)(m,n=>n?n.productNotifications:y.E3),v=(0,a.P1)(h,n=>n.loading),T=(0,a.P1)(h,n=>n.error),{selectAll:S}=y.tz.getSelectors(h);var _=i(61699);let O=(()=>{class n{constructor(g){this.store=g,this.productNotificationsLoading$=this.store.pipe((0,a.Ys)(v)),this.productNotificationsError$=this.store.pipe((0,a.Ys)(T)),this.productNotificationType$=this.store.pipe((0,a.Ys)((0,F.hZ)("notificationType")),(0,c.x)(),(0,d.U)(P=>P||"price")),this.productNotificationsByRoute$=this.productNotificationType$.pipe((0,C.w)(P=>this.productNotifications$(P)))}productNotifications$(g){return this.store.dispatch(N.u.loadProductNotifications({type:g})),this.store.pipe((0,a.Ys)((n=>(0,a.P1)(S,Z=>Z.filter(g=>g.type===n)))(g)))}productNotificationBySku$(g,P){return this.store.dispatch(N.u.loadProductNotifications({type:P})),this.store.pipe((0,a.Ys)(((n,Z)=>(0,a.P1)(S,g=>g.filter(P=>P.sku===n&&P.type===Z)))(g,P))).pipe((0,d.U)(J=>J?.length?J[0]:void 0),(0,c.x)(t.Z))}createProductNotification(g){this.store.dispatch(N.u.createProductNotification({productNotification:g}))}updateProductNotification(g,P){this.store.dispatch(N.u.updateProductNotification({sku:g,productNotification:P}))}deleteProductNotification(g,P,J){this.store.dispatch(N.u.deleteProductNotification({sku:g,productNotificationType:P,productNotificationId:J}))}static#t=this.\u0275fac=function(P){return new(P||n)(_.LFG(a.yh))};static#i=this.\u0275prov=_.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})()},242:(L,M,i)=>{i.d(M,{V:()=>c});var a=i(7462),t=i(61699);let c=(()=>{class d{static#t=this.\u0275fac=function(N){return new(N||d)};static#i=this.\u0275mod=t.oAB({type:d});static#o=this.\u0275inj=t.cJS({imports:[a.SharedModule]})}return d})()},9062:(L,M,i)=>{i.d(M,{r:()=>v});var a=i(23163),t=i(71308),c=i(61699),d=i(15788),C=i(26575),F=i(76581),N=i(60683),m=i(5939);const y=function(){return["fas","trash-alt"]},h=function(T,S,E){return{confirmText:T,rejectText:S,titleText:E}};let v=(()=>{class T{constructor(E,A){this.productNotificationsFacade=E,this.context=A}ngOnInit(){this.productName$=this.context.select("product","name")}openConfirmationDialog(E){E.show()}deleteProductNotification(){const E=this.context.get("sku");this.productNotificationsFacade.deleteProductNotification(E,this.productNotification.type,this.productNotification.id)}static#t=this.\u0275fac=function(A){return new(A||T)(c.Y36(t.M),c.Y36(a._))};static#i=this.\u0275cmp=c.Xpm({type:T,selectors:[["ish-product-notification-delete"]],inputs:{productNotification:"productNotification",cssClass:"cssClass"},decls:10,vars:20,consts:[["type","button","data-testing-id","product-notification-delete",3,"ngClass","click"],[3,"icon","title"],[3,"options","confirmed"],["deleteDialog",""],[3,"ishServerHtml"]],template:function(A,_){if(1&A){const O=c.EpF();c.TgZ(0,"button",0),c.NdJ("click",function(){c.CHM(O);const Z=c.MAs(4);return c.KtG(_.openConfirmationDialog(Z))}),c._UZ(1,"fa-icon",1),c.ALo(2,"translate"),c.qZA(),c.TgZ(3,"ish-modal-dialog",2,3),c.NdJ("confirmed",function(){return _.deleteProductNotification()}),c.ALo(5,"translate"),c.ALo(6,"translate"),c.ALo(7,"async"),c._UZ(8,"div",4),c.ALo(9,"translate"),c.qZA()}2&A&&(c.Q6J("ngClass",_.cssClass),c.xp6(1),c.Q6J("icon",c.DdM(15,y))("title",c.lcZ(2,5,"product.notification.delete.link.title")),c.xp6(2),c.Q6J("options",c.kEZ(16,h,c.lcZ(5,7,"product.notification.delete.button.label"),c.lcZ(6,9,"product.notification.delete.cancel.button.label"),c.lcZ(7,11,_.productName$))),c.xp6(5),c.Q6J("ishServerHtml",c.lcZ(9,13,"product.notification.delete.message")))},dependencies:[d.h,C.mk,F.s,N.BN,C.Ov,m.X$],encapsulation:2,changeDetection:0})}return T})()},48401:(L,M,i)=>{i.d(M,{h:()=>B});var a=i(42321),t=i(61699),c=i(60839),d=i(27947),C=i(79736),F=i(81527),N=i(62357),m=i(23163),y=i(95183),h=i(26575),v=i(60683),T=i(28849),S=i(84980),E=i(81891),A=i(21650),_=i(24972),O=i(49680),n=i(37577),Z=i(71308),g=i(5823),P=i(76210),J=i(72706),U=i(58399);let I=(()=>{class l{constructor(o,e){this.appFacade=o,this.context=e}ngOnChanges(){this.userEmail&&this.form&&(this.product=this.context.get("product"),this.productPrices=this.context.get("prices"),this.model=this.productNotification?{alertType:this.productNotification.type,email:this.productNotification.notificationMailAddress,priceValue:this.productNotification.price?.value,productNotificationId:this.productNotification.id}:{alertType:void 0,email:this.userEmail,priceValue:this.productPrices.salePrice.value},this.fields=this.productNotification?this.getFieldsForProductNotification(this.productNotification,this.product):this.getFieldsForNoProductNotification(this.product))}getFieldsForProductNotification(o,e){return[{key:"alertType",type:"ish-radio-field",props:{label:"product.notification.edit.form.no_notification.label",fieldClass:" ",value:"delete"}},{key:"productNotificationId"},..."price"===o?.type||e?.available?this.getPriceConfigForProductNotification():[],..."stock"!==o?.type&&e?.available?[]:this.getStockConfigForProductNotification(),...this.getEmailConfig()]}getFieldsForNoProductNotification(o){return[{key:"alertType",props:{value:""}},{type:"ish-fieldset-field",props:{legend:o?.available?"product.notification.edit.form.price_notification.label":"product.notification.edit.form.instock_notification.label",legendClass:"row mb-3"},fieldGroup:[...o?.available?this.getPriceConfig():[],...this.getEmailConfig()]}]}getPriceConfigForProductNotification(){return[{key:"alertType",type:"ish-radio-field",props:{label:"product.notification.edit.form.price_notification.label",fieldClass:" ",value:"price"}},...this.getPriceConfig()]}getStockConfigForProductNotification(){return[{key:"alertType",type:"ish-radio-field",props:{label:"product.notification.edit.form.instock_notification.label",fieldClass:" ",value:"stock"}}]}getPriceConfig(){return[{key:"priceValue",type:"ish-text-input-field",props:{postWrappers:[{wrapper:"input-addon",index:-1}],label:"product.notification.edit.form.price.label",required:!0,hideRequiredMarker:!0,addonLeft:{text:this.appFacade.currencySymbol$()}},validators:{validation:[J.N.moneyAmount]},validation:{messages:{required:"product.notification.edit.form.price.error.required",moneyAmount:"product.notification.edit.form.price.error.valid"}}}]}getEmailConfig(){return[{key:"email",type:"ish-email-field",props:{label:"product.notification.edit.form.email.label",required:!0,hideRequiredMarker:!0}}]}static#t=this.\u0275fac=function(e){return new(e||l)(t.Y36(_.l),t.Y36(m._))};static#i=this.\u0275cmp=t.Xpm({type:l,selectors:[["ish-product-notification-edit-form"]],inputs:{form:"form",productNotification:"productNotification",userEmail:"userEmail"},features:[t.TTD],decls:2,vars:3,consts:[[1,"col-md-12"],[3,"form","fields","model"]],template:function(e,p){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"formly-form",1),t.qZA()),2&e&&(t.xp6(1),t.Q6J("form",p.form)("fields",p.fields)("model",p.model))},dependencies:[U.T7],encapsulation:2,changeDetection:0})}return l})();var b=i(5939);const u=["modal"];function Q(l,x){if(1&l&&(t.ynx(0),t._uU(1),t.BQk()),2&l){const o=x.ngIf;t.xp6(1),t.hij(" ",o.name," ")}}
1function r(l,x){if(1&l){const o=t.EpF();t.ynx(0),t.TgZ(1,"form",8),t.NdJ("ngSubmit",function(){t.CHM(o);const p=t.oxw(2);return t.KtG(p.submitForm())}),t.TgZ(2,"div",9),t._UZ(3,"ish-product-image",10)(4,"ish-product-notification-edit-form",11),t.ALo(5,"async"),t.qZA(),t.TgZ(6,"div",12)(7,"button",13),t._uU(8),t.ALo(9,"translate"),t.qZA(),t.TgZ(10,"button",14),t.NdJ("click",function(){t.CHM(o);const p=t.oxw(2);return t.KtG(p.hide())}),t._uU(11),t.ALo(12,"translate"),t.qZA()()(),t.BQk()}if(2&l){const o=x.ngIf,e=t.oxw(2);t.xp6(1),t.Q6J("formGroup",e.productNotificationForm),t.xp6(2),t.Q6J("index",0),t.xp6(1),t.Q6J("form",e.productNotificationForm)("productNotification",o)("userEmail",t.lcZ(5,7,e.userEmail$)),t.xp6(4),t.hij(" ",t.lcZ(9,9,"product.notification.edit.form.update.button.label")," "),t.xp6(3),t.hij(" ",t.lcZ(12,11,"product.notification.edit.form.cancel.button.label")," ")}}function s(l,x){if(1&l){const o=t.EpF();t.TgZ(0,"form",8),t.NdJ("ngSubmit",function(){t.CHM(o);const p=t.oxw(2);return t.KtG(p.submitForm())}),t.TgZ(1,"div",9),t._UZ(2,"ish-product-image",10)(3,"ish-product-notification-edit-form",15),t.ALo(4,"async"),t.qZA(),t.TgZ(5,"div",12)(6,"button",16),t._uU(7),t.ALo(8,"translate"),t.qZA(),t.TgZ(9,"button",14),t.NdJ("click",function(){t.CHM(o);const p=t.oxw(2);return t.KtG(p.hide())}),t._uU(10),t.ALo(11,"translate"),t.qZA()()()}if(2&l){const o=t.oxw(2);t.Q6J("formGroup",o.productNotificationForm),t.xp6(2),t.Q6J("index",0),t.xp6(1),t.Q6J("form",o.productNotificationForm)("userEmail",t.lcZ(4,6,o.userEmail$)),t.xp6(4),t.hij(" ",t.lcZ(8,8,"product.notification.edit.form.create.button.label")," "),t.xp6(3),t.hij(" ",t.lcZ(11,10,"product.notification.edit.form.cancel.button.label")," ")}}function f(l,x){if(1&l){const o=t.EpF();t.TgZ(0,"div",1)(1,"h2",2),t.YNc(2,Q,2,1,"ng-container",3),t.ALo(3,"async"),t.qZA(),t.TgZ(4,"button",4),t.NdJ("click",function(){t.CHM(o);const p=t.oxw();return t.KtG(p.hide())}),t.ALo(5,"translate"),t.TgZ(6,"span",5),t._uU(7,"\xd7"),t.qZA()()(),t.YNc(8,r,13,13,"ng-container",6),t.ALo(9,"async"),t.YNc(10,s,12,12,"ng-template",null,7,t.W1O)}if(2&l){const o=t.MAs(11),e=t.oxw();
1t.xp6(2),t.Q6J("ngIf",t.lcZ(3,4,e.product$)),t.xp6(2),t.Q6J("title",t.lcZ(5,6,"dialog.close.text")),t.xp6(4),t.Q6J("ngIf",t.lcZ(9,8,e.productNotification$))("ngIfElse",o)}}let D=(()=>{class l{constructor(o,e,p,$,Y){this.ngbModal=o,this.context=e,this.accountFacade=p,this.productNotificationsFacade=$,this.appFacade=Y,this.productNotificationForm=new T.nJ({}),this.submitted=!1,this.destroyRef=(0,t.f3M)(t.ktI)}ngOnInit(){this.product$=this.context.select("product"),this.productAvailable$=this.context.select("product","available"),this.userEmail$=this.accountFacade.userEmail$,this.appFacade.currentCurrency$.pipe((0,O.HB)(),(0,c.sL)(this.destroyRef)).subscribe(o=>{this.currentCurrency=o}),this.productNotification$=this.productNotification?(0,S.of)(this.productNotification):this.productAvailable$.pipe((0,E.w)(o=>this.productNotificationsFacade.productNotificationBySku$(this.context.get("sku"),o?"price":"stock").pipe((0,A.d)(1))))}hide(){this.productNotificationForm.reset(),this.modal&&this.modal.close()}show(){this.modal=this.ngbModal.open(this.modalTemplate)}get formDisabled(){return this.productNotificationForm.invalid&&this.submitted}submitForm(){if(this.productNotificationForm.invalid)return(0,n.b)(this.productNotificationForm),void(this.submitted=!0);{const o=this.context.get("sku"),e=this.productNotificationForm.value,p=void 0===e.priceValue?"stock":"price",Y={id:void 0,type:p,sku:o,notificationMailAddress:this.productNotificationForm.value.email,price:{type:"Money",value:e.priceValue,currency:this.currentCurrency}};void 0!==e.alertType&&"delete"===e.alertType?this.productNotificationsFacade.deleteProductNotification(o,p,void 0!==e.productNotificationId?e.productNotificationId:""):void 0===e.alertType||"price"!==e.alertType&&"stock"!==e.alertType?this.productNotificationsFacade.createProductNotification(Y):this.productNotificationsFacade.updateProductNotification(o,Y),this.hide()}}static#t=this.\u0275fac=function(e){return new(e||l)(t.Y36(g.FF),t.Y36(m._),t.Y36(N.Y),t.Y36(Z.M),t.Y36(_.l))};static#i=this.\u0275cmp=t.Xpm({type:l,selectors:[["ish-product-notification-edit-dialog"]],viewQuery:function(e,p){if(1&e&&t.Gf(u,5),2&e){let $;t.iGM($=t.CRH())&&(p.modalTemplate=$.first)}},inputs:{productNotification:"productNotification"},decls:2,vars:0,consts:[["modal",""],[1,"modal-header"],[1,"modal-title"],[4,"ngIf"],["type","button",1,"close",3,"title","click"],["aria-hidden","true"],[4,"ngIf","ngIfElse"],["createNotificationButton",""],[3,"formGroup","ngSubmit"],[1,"modal-body"],["imageType","L","productList","ProductNotification",3,"index"],[3,"form","productNotification","userEmail"],[1,"modal-footer"],["type","submit","data-testing-id","product-notification-edit-dialog-edit",1,"btn","btn-primary"],["type","button",1,"btn","btn-secondary",3,"click"],[3,"form","userEmail"],["type","submit",1,"btn","btn-primary"]],template:function(e,p){1&e&&t.YNc(0,f,12,10,"ng-template",null,0,t.W1O)},dependencies:[P.l,h.O5,T._Y,T.JL,T.sg,I,h.Ov,b.X$],encapsulation:2,changeDetection:0})}return l})();const K=function(){return["fas","pencil-alt"]};function W(l,x){if(1&l){const o=t.EpF();t.TgZ(0,"button",6),t.NdJ("click",function(){t.CHM(o);const p=t.oxw(2),$=t.MAs(3);return t.KtG(p.openModal($))}),t._UZ(1,"fa-icon",7),t.ALo(2,"translate"),t.qZA()}if(2&l){const o=t.oxw(2);t.Q6J("ngClass",o.cssClass),t.xp6(1),t.Q6J("icon",t.DdM(5,K))("title",t.lcZ(2,3,"product.notification.edit.link.title"))}}function G(l,x){if(1&l){const o=t.EpF();t.ynx(0),t.TgZ(1,"button",8),t.NdJ("click",function(){t.CHM(o);const p=t.oxw(2),$=t.MAs(3);return t.KtG(p.openModal($))}),t.ALo(2,"translate"),t.ALo(3,"async"),t._uU(4),t.ALo(5,"translate"),t.ALo(6,"async"),t.qZA(),t.BQk()}if(2&l){const o=t.oxw(2);t.xp6(1),t.Q6J("ngClass",o.cssClass)("title",t.lcZ(2,3,t.lcZ(3,5,o.buttonKey("title")))),t.xp6(3),t.hij(" ",t.lcZ(5,7,t.lcZ(6,9,o.buttonKey("label")))," ")}}function H(l,x){if(1&l&&(t.ynx(0,3),t.YNc(1,W,3,6,"button",4),t.YNc(2,G,7,11,"ng-container",5),t.BQk()),2&l){const o=t.oxw();t.Q6J("ngSwitch",o.displayType),t.xp6(1),t.Q6J("ngSwitchCase","icon"),t.xp6(1),t.Q6J("ngSwitchCase","button")}}let B=class R{constructor(x,o,e){this.context=x,this.accountFacade=o,this.router=e,this.displayType="button",this.destroyRef=(0,t.f3M)(t.ktI)}ngOnInit(){this.visible$=this.context.select("displayProperties","addToNotification")}buttonKey(x){return this.context.select("product","available").pipe((0,C.U)(o=>`product.notification.${o?"price":"stock"}.notification.button.${x}`))}openModal(x){this.accountFacade.isLoggedIn$.pipe((0,F.q)(1),(0,c.sL)(this.destroyRef)).subscribe(o=>{o?x.show():this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.routerState.snapshot.url,messageKey:"productnotification"}})})}static#t=this.\u0275fac=function(o){return new(o||R)(t.Y36(m._),t.Y36(N.Y),t.Y36(d.F0))};static#i=this.\u0275cmp=t.Xpm({type:R,selectors:[["ish-product-notification-edit"]],inputs:{productNotification:"productNotification",displayType:"displayType",cssClass:"cssClass"},decls:4,vars:4,consts:[[3,"ngSwitch",4,"ngIf"],[3,"productNotification"],["modal",""],[3,"ngSwitch"],["type","button","class","btn","data-testing-id","product-notification-edit",3,"ngClass","click",4,"ngSwitchCase"],[4,"ngSwitchCase"],["type","button","data-testing-id","product-notification-edit",1,"btn",3,"ngClass","click"],[3,"icon","title"],["type","button","data-testing-id","product-notification-edit",3,"ngClass","title","click"]],template:function(o,e){1&o&&(t.YNc(0,H,3,3,"ng-container",0),t.ALo(1,"async"),t._UZ(2,"ish-product-notification-edit-dialog",1,2)),2&o&&(t.Q6J("ngIf",t.lcZ(1,2,e.visible$)),t.xp6(2),t.Q6J("productNotification",e.productNotification))}
1,dependencies:[h.mk,h.O5,h.RF,h.n9,v.BN,D,h.Ov,b.X$],encapsulation:2,changeDetection:0})};B=(0,a.gn)([(0,y.Z)(),(0,a.w6)("design:paramtypes",[m._,N.Y,d.F0])],B)},22695:(L,M,i)=>{i.d(M,{J:()=>d,u:()=>c});var a=i(36270),t=i(91790);const c=(0,a.R7)({source:"Product Notifications",events:{"Load Product Notifications":(0,t.xm)(),"Create Product Notification":(0,t.xm)(),"Update Product Notification":(0,t.xm)(),"Delete Product Notification":(0,t.xm)()}}),d=(0,a.R7)({source:"Product Notification API",events:{"Load Product Notifications Success":(0,t.xm)(),"Load Product Notifications Fail":(0,t.W3)(),"Create Product Notification Success":(0,t.xm)(),"Create Product Notification Fail":(0,t.W3)(),"Update Product Notification Success":(0,t.xm)(),"Update Product Notification Fail":(0,t.W3)(),"Delete Product Notification Success":(0,t.xm)(),"Delete Product Notification Fail":(0,t.W3)()}})},74742:(L,M,i)=>{i.d(M,{E3:()=>F,F7:()=>N,tz:()=>C});var a=i(28825),t=i(36270),c=i(91790),d=i(22695);const C=(0,a.H)(),F=C.getInitialState({loading:!1,error:void 0}),N=(0,t.Lq)(F,(0,c.SH)(d.u.loadProductNotifications,d.u.createProductNotification,d.u.updateProductNotification,d.u.deleteProductNotification),(0,c.Ic)(d.J.loadProductNotificationsFail,d.J.createProductNotificationFail,d.J.updateProductNotificationFail,d.J.deleteProductNotificationFail),(0,c.$i)(d.J.loadProductNotificationsSuccess,d.J.createProductNotificationSuccess,d.J.updateProductNotificationSuccess,d.J.deleteProductNotificationSuccess),(0,t.on)(d.J.loadProductNotificationsSuccess,(m,y)=>C.upsertMany(y.payload.productNotifications,{...C.removeMany(h=>h.type===y.payload.type,m)})),(0,t.on)(d.J.createProductNotificationSuccess,(m,y)=>C.addOne(y.payload.productNotification,m)),(0,t.on)(d.J.updateProductNotificationSuccess,(m,y)=>C.upsertOne(y.payload.productNotification,m)),(0,t.on)(d.J.deleteProductNotificationSuccess,(m,y)=>({...C.removeOne(y.payload.productNotificationId,m)})))},87160:(L,M,i)=>{i.r(M),i.d(M,{PRODUCT_NOTIFICATIONS_STORE_CONFIG:()=>I,ProductNotificationsConfig:()=>U,ProductNotificationsStoreModule:()=>b});var a=i(61699),t=i(16902),c=i(36270),d=i(73258),C=i(21521),F=i(81891),N=i(79736),m=i(72607),y=i(39877),h=i(53783),v=i(49680),T=i(81527),S=i(33252),E=i(87588),A=i(36468);let _=(()=>{class u{static fromData(r,s){if(r)return{id:r.sku.concat("_").concat(s),type:s,sku:r.sku,notificationMailAddress:r.notificationMailAddress,price:r.price};throw new Error("productNotificationData is required")}static#t=this.\u0275fac=function(s){return new(s||u)};static#i=this.\u0275prov=a.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})(),O=(()=>{class u{constructor(r,s){this.apiService=r,this.store=s,this.currentCustomer$=this.store.pipe((0,c.Ys)(A.Qg),(0,v.HB)(),(0,T.q)(1))}getProductNotifications(r){return this.currentCustomer$.pipe((0,F.w)(s=>this.apiService.get(s.isBusinessCustomer?`customers/${s.customerNo}/users/-/notifications/${r}`:`privatecustomers/-/notifications/${r}`).pipe((0,E.V)(),this.apiService.resolveLinks(),(0,N.U)(f=>f.map(D=>_.fromData(D,r))))))}createProductNotification(r){return r?this.currentCustomer$.pipe((0,F.w)(s=>this.apiService.post(s.isBusinessCustomer?`customers/${s.customerNo}/users/-/notifications/${r.type}`:`privatecustomers/-/notifications/${r.type}`,r).pipe(this.apiService.resolveLink(),(0,N.U)(f=>_.fromData(f,r.type))))):(0,S._)(()=>new Error("createProductNotification() called without notification"))}updateProductNotification(r,s){return r?s?this.currentCustomer$.pipe((0,F.w)(f=>this.apiService.put(f.isBusinessCustomer?`customers/${f.customerNo}/users/-/notifications/${s.type}/${r}`:`privatecustomers/-/notifications/${s.type}/${r}`,s).pipe((0,N.U)(D=>_.fromData(D,s.type))))):(0,S._)(()=>new Error("updateProductNotification() called without notification")):(0,S._)(()=>new Error("updateProductNotification() called without sku"))}deleteProductNotification(r,s){return r?s?this.currentCustomer$.pipe((0,F.w)(f=>this.apiService.delete(f.isBusinessCustomer?`customers/${f.customerNo}/users/-/notifications/${s}/${r}`:`privatecustomers/-/notifications/${s}/${r}`))):(0,S._)(()=>new Error("deleteProductNotification() called without type")):(0,S._)(()=>new Error("deleteProductNotification() called without sku"))}static#t=this.\u0275fac=function(s){return new(s||u)(a.LFG(E.s),a.LFG(c.yh))};static#i=this.\u0275prov=a.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();var n=i(22695);let Z=(()=>{class u{constructor(r,s){this.actions$=r,this.productNotificationsService=s,this.loadProductNotifications$=(0,t.GW)(()=>this.actions$.pipe((0,t.l4)(n.u.loadProductNotifications),(0,v.Ym)("type"),(0,F.w)(f=>this.productNotificationsService.getProductNotifications(f).pipe((0,N.U)(D=>n.J.loadProductNotificationsSuccess({productNotifications:D,type:f})),(0,v.TC)(n.J.loadProductNotificationsFail))))),this.createProductNotification$=(0,t.GW)(()=>this.actions$.pipe((0,t.l4)(n.u.createProductNotification),(0,v.fg)(),(0,v.HB)(),(0,m.z)(f=>this.productNotificationsService.createProductNotification(f.productNotification).pipe((0,m.z)(D=>[n.J.createProductNotificationSuccess({productNotification:D}),(0,h.SY)({message:"product.notification.create.success.message"})]),(0,v.TC)(n.J.createProductNotificationFail))))),this.updateProductNotification$=(0,t.GW)(()=>this.actions$.pipe((0,t.l4)(n.u.updateProductNotification),(0,v.fg)(),(0,v.HB)(),(0,y.b)(f=>this.productNotificationsService.updateProductNotification(f.sku,f.productNotification).pipe((0,m.z)(D=>[n.J.updateProductNotificationSuccess({productNotification:D}),(0,h.SY)({message:"product.notification.update.success.message"})]),(0,v.TC)(n.J.updateProductNotificationFail))))),this.deleteProductNotification$=(0,t.GW)(()=>this.actions$.pipe((0,t.l4)(n.u.deleteProductNotification),(0,v.fg)(),(0,m.z)(f=>this.productNotificationsService.deleteProductNotification(f.sku,f.productNotificationType).pipe((0,m.z)(()=>[n.J.deleteProductNotificationSuccess({productNotificationId:f.productNotificationId}),(0,h.SY)({message:"product.notification.delete.success.message"})]),(0,v.TC)(n.J.deleteProductNotificationFail))))),this.displayProductNotificationErrorMessage$=(0,t.GW)(()=>this.actions$.pipe((0,t.l4)(n.J.loadProductNotificationsFail,n.J.createProductNotificationFail,n.J.updateProductNotificationFail,n.J.deleteProductNotificationFail),(0,v.Ym)("error"),(0,N.U)(f=>(0,h.Vw)({message:f.message}))))}static#t=this.\u0275fac=function(s){return new(s||u)(a.LFG(t.eX),a.LFG(O))};static#i=this.\u0275prov=a.Yz7({token:u,factory:u.\u0275fac})}return u})();const P={productNotifications:i(74742).F7},J=[Z];let U=(()=>{class u{constructor(){this.metaReducers=[C.iT]}static#t=this.\u0275fac=function(s){return new(s||u)};static#i=this.\u0275prov=a.Yz7({token:u,factory:u.\u0275fac})}return u})();const I=new a.OlP("productNotificationsStoreConfig");let b=(()=>
1{class u{static forTesting(...r){return c.Aw.forFeature("productNotifications",(0,d.Z)(P,r))}static#t=this.\u0275fac=function(s){return new(s||u)};static#i=this.\u0275mod=a.oAB({type:u});static#o=this.\u0275inj=a.cJS({providers:[{provide:I,useClass:U}],imports:[t.sQ.forFeature(J),c.Aw.forFeature("productNotifications",P,I)]})}return u})()}}]); 2//# sourceMappingURL=product-notifications.f926511ebb7051fc.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.