import{a as se}from"./chunk-P6ICDSK2.js";import{f as ue,g as _e,h as fe,i as be,j as he}from"./chunk-MBTXZSRY.js";import{b as pe}from"./chunk-PSWVHTEU.js";import{J as de}from"./chunk-CWWVHRJU.js";import{c as ne,d as oe}from"./chunk-7JA7UHZ2.js";import{a as re}from"./chunk-6IGMG2LM.js";import{a as ee}from"./chunk-RU43IR5J.js";import{a as ie}from"./chunk-SLGBXDUF.js";import{n as ce,o as le,p as ae,q as me}from"./chunk-L7CU4UNF.js";import{a as te}from"./chunk-VQWPF2OP.js";import{a as $}from"./chunk-ILYMG6ZI.js";import{U as Z,r as I}from"./chunk-MXUIPT66.js";import{I as X,b as V,f as N,l as O}from"./chunk-DX7LHTFF.js";import{Aa as g,Ab as c,Ba as C,Bb as y,Cb as w,Da as q,Db as D,Dc as Y,Fb as x,Kb as u,Kd as L,Lb as p,Og as J,Pb as U,Ua as t,Va as R,Vc as Q,Wc as z,Wg as K,Xc as M,Yb as _,Zb as G,_b as b,cc as P,dc as S,ec as E,gb as T,ib as v,ic as A,jc as F,kc as H,ob as r,qb as W,rc as d,sc as s,ta as k,tc as j,yh as B,zb as a}from"./chunk-N6B2OJOY.js";var ge=(n,l)=>({code:n,name:l}),Ce=n=>({cxRoute:"product",params:n}),Re=()=>({state:"HelpText"}),Pe=()=>({state:"PopUpText"});function Se(n,l){if(n&1&&(a(0,"div",22),_(1),c()),n&2){let i=p();t(),b(" ",i.foerchArticleCode," ")}}function Ee(n,l){if(n&1&&(a(0,"div",22),_(1),c()),n&2){let i=p();t(),b(" ",i.item.customArticleCode," ")}}function Ae(n,l){if(n&1&&(y(0,"foerch-help-text-popup",23),d(1,"foerchSaleabilitySpecificText"),d(2,"foerchSaleabilitySpecificText")),n&2){let i=p();r("helpText",j(1,2,i.item,A(8,Re)))("popupText",j(2,5,i.item,A(9,Pe)))}}function we(n,l){if(n&1&&y(0,"foerch-follow-up-article-link",24),n&2){let i=p();r("sequelProduct",i.item.saleability==null?null:i.item.saleability.followUpProduct)}}function De(n,l){n&1&&y(0,"foerch-helpt-text-icon",25)}function Le(n,l){if(n&1){let i=x();w(0),a(1,"div",26)(2,"button",27),u("click",function(){g(i);let o=p();return C(o.addEntryToCart())}),y(3,"cx-icon",21),c(),a(4,"button",28),u("click",function(){g(i);let o=p();return C(o.removeItem())}),y(5,"cx-icon",21),c()(),D()}if(n&2){let i=p();t(2),W("disabled",(i.item==null||i.item.saleability==null?null:i.item.saleability.purchasable)===!1),r("disabled",(i.item==null||i.item.saleability==null?null:i.item.saleability.purchasable)===!1),t(),r("type",i.icons.CART),t(2),r("type",i.icons.DELETE)}}var Te=(()=>{let l=class l extends _e{constructor(){super(),this.isExpanded=!1}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=k({type:l,selectors:[["foerch-reminder-mobile-product-list-item"]],features:[T],decls:32,vars:43,consts:[[1,"row","flex-nowrap"],[1,"col-auto","pe-0"],[1,"form-check","form-checkbox","me-0","mb-2"],["name","article","type","checkbox",1,"form-check-input",3,"ngModelChange","change","id","ngModel"],[1,"form-check-label",3,"for"],[1,"cartEntry-img"],[1,"d-block",3,"routerLink"],["format","thumbnail",3,"container"],[1,"col","px-0"],[1,"cartEntry-body"],[1,"cartEntry-name",3,"routerLink"],["class","cartEntry-code",4,"ngIf"],[1,"cartEntry-desc"],["class","mt-1 d-block",3,"helpText","popupText",4,"ngIf"],[3,"sequelProduct",4,"ngIf"],["class","mt-1 d-block",4,"ngIf"],[4,"ngIf"],[1,"col-auto"],[1,"cartEntry-action-wrapper"],[1,"cartEntry-action"],[1,"btn-icon","cartEntry-action-arrow",3,"click"],[3,"type"],[1,"cartEntry-code"],[1,"mt-1","d-block",3,"helpText","popupText"],[3,"sequelProduct"],[1,"mt-1","d-block"],[1,"mt-2"],[1,"btn","btn-commerce","me-1",3,"click","disabled"],[1,"btn","btn-link",3,"click"]],template:function(o,e){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"input",3),E("ngModelChange",function(f){return S(e.markItem,f)||(e.markItem=f),f}),u("change",function(){return e.toggleCheckbox()}),c(),y(4,"label",4),c(),a(5,"div",5)(6,"a",6),d(7,"foerchStrip"),d(8,"cxUrl"),y(9,"cx-media",7),c()()(),a(10,"div",8)(11,"div",9)(12,"a",10),d(13,"foerchStrip"),d(14,"cxUrl"),_(15),c(),v(16,Se,2,1,"div",11)(17,Ee,2,1,"div",11),a(18,"div",12),_(19),c(),v(20,Ae,3,10,"foerch-help-text-popup",13),d(21,"foerchSaleabilityIsSpecific"),v(22,we,1,1,"foerch-follow-up-article-link",14),d(23,"foerchSaleabilityHasFollowUp"),v(24,De,1,0,"foerch-helpt-text-icon",15),d(25,"foerchSaleabilityIsGeneral"),v(26,Le,6,5,"ng-container",16),c()(),a(27,"div",17)(28,"div",18)(29,"div",19)(30,"button",20),u("click",function(){return e.isExpanded=!e.isExpanded}),y(31,"cx-icon",21),c()()()()()),o&2&&(t(3),U("id","markMeArticle_",e.item==null?null:e.item.code,""),P("ngModel",e.markItem),t(),U("for","markMeArticle_",e.item==null?null:e.item.code,""),t(2),r("routerLink",s(8,21,F(36,Ce,H(33,ge,e.item.baseProduct,s(7,19,e.item.baseProductName))))),t(3),r("container",(e.item==null?null:e.item.images)&&e.item.images.PRIMARY),t(3),r("routerLink",s(14,25,F(41,Ce,H(38,ge,e.item.baseProduct,s(13,23,e.item.baseProductName))))),t(3),b(" ",e.item==null?null:e.item.baseProductName," "),t(),r("ngIf",e.foerchArticleCode&&(e.articleNumberMode!==e.articleNumberModes.CUSTOMER||!e.item.customArticleCode)),t(),r("ngIf",e.articleNumberMode!==e.articleNumberModes.FOERCH&&e.item.customArticleCode),t(2),b(" ",e.item==null?null:e.item.name," "),t(),r("ngIf",s(21,27,e.item)),t(2),r("ngIf",s(23,29,e.item)),t(2),r("ngIf",s(25,31,e.item)),t(2),r("ngIf",e.isExpanded),t(4),W("active",e.isExpanded),t(),r("type",e.icons.ARROW_DOWN))},dependencies:[M,L,I,Z,V,N,O,ne,oe,pe,K,te,ce,le,ae,me],encapsulation:2,changeDetection:0});let n=l;return n})();var Ve=n=>({open:n}),Ne=n=>({active:n});function Oe(n,l){if(n&1){let i=x();a(0,"foerch-reminder-mobile-product-list-item",24),u("addToCart",function(){let o=g(i).$implicit,e=p(2);return C(e.onAddToCart(o))})("itemToggled",function(){let o=g(i).$implicit,e=p(2);return C(e.onItemToggled(o))})("remove",function(){let o=g(i).$implicit,e=p(2);return C(e.onRemoveProduct(o))}),c()}if(n&2){let i=l.$implicit,m=p(2);r("articleNumberMode",m.articleNumberMode)("item",i)("markItem",m.selectionHelper.getItemStatus(i.code))}}function We(n,l){if(n&1){let i=x();w(0),a(1,"div",10),v(2,Oe,1,3,"foerch-reminder-mobile-product-list-item",11),c(),a(3,"div",12)(4,"div",13)(5,"div",14)(6,"div",15)(7,"input",16),E("ngModelChange",function(o){g(i);let e=p();return S(e.areAllSelected,o)||(e.areAllSelected=o),C(o)}),u("click",function(){g(i);let o=p();return C(o.toggleAllProducts())}),c(),a(8,"label",17),_(9),d(10,"cxTranslate"),c()()(),a(11,"div",18)(12,"button",19),u("click",function(){g(i);let o=p();return C(o.toggleBatchProcessing())}),_(13),d(14,"cxTranslate"),y(15,"cx-icon",6),c()()(),a(16,"div",20)(17,"div",21)(18,"ng-select",22),d(19,"cxTranslate"),E("ngModelChange",function(o){g(i);let e=p();return S(e.bulkActionOptions[0],o)||(e.bulkActionOptions[0]=o),C(o)}),u("change",function(o){g(i);let e=p();return C(e.optionChanged(o))}),c()(),a(20,"button",23),u("click",function(){g(i);let o=p();return C(o.applyBulkAction())}),_(21),d(22,"cxTranslate"),c()()(),D()}if(n&2){let i=p();t(2),r("ngForOf",i.products)("ngForTrackBy",i.trackByIndex),t(5),P("ngModel",i.areAllSelected),t(2),G(s(10,15,"common.selectAll")),t(3),r("ngClass",F(23,Ne,!i.isCollapsedBatchProcessing)),t(),b(" ",s(14,17,"common.batchProcessing")," "),t(2),r("type",i.iconTypes.ARROW_DOWN),t(),r("ngbCollapse",i.isCollapsedBatchProcessing),t(2),r("clearable",!1)("items",i.bulkActionOptions)("placeholder",s(19,19,"common.markedArticles"))("searchable",!1),P("ngModel",i.bulkActionOptions[0]),t(2),r("disabled",i.selectionHelper.getSelectedItems().length===0),t(),b(" ",s(22,21,"common.apply")," ")}}var Fe=(()=>{let l=class l extends be{constructor(m,o,e,h){super(m,o,e,h),this.activeCartService=m,this.transService=o,this.permissionsService=e,this.cd=h,this.iconTypes=$,this.isCollapsedAddArticle=!0,this.isCollapsedBatchProcessing=!0}trackByIndex(m){return m}applyBulkAction(){let m=this.selectionHelper.areAllSelected();super.applyBulkAction(),m&&this.selectedOption.code===fe.REMOVE_FROM_LIST&&(this.isCollapsedBatchProcessing=!0)}toggleBatchProcessing(){this.isCollapsedBatchProcessing=!this.isCollapsedBatchProcessing}};l.\u0275fac=function(o){return new(o||l)(R(de),R(J),R(ee),R(Y))},l.\u0275cmp=k({type:l,selectors:[["foerch-reminder-mobile-product-list"]],features:[T],decls:14,vars:13,consts:[[1,"form-headline"],[1,"cartBox","my-2",3,"ngClass"],["type","button",1,"btn","btn-block","cartBox-headBtn","align-items-center",3,"click"],[1,"row","justify-content-between"],[1,"col","text-start"],[1,"col-auto"],[3,"type"],[1,"cartBox-body",3,"ngbCollapse"],[3,"addToCart","cartMode"],[4,"ngIf"],[1,"cart-details-wrapper"],[3,"articleNumberMode","item","markItem","addToCart","itemToggled","remove",4,"ngFor","ngForOf","ngForTrackBy"],[1,"bulkEditMobile","bulkEdit_shift"],[1,"row"],[1,"col"],[1,"form-check","form-checkbox"],["id","markAll","name","markAll","type","checkbox",1,"form-check-input",3,"ngModelChange","click","ngModel"],["for","markAll",1,"form-check-label"],[1,"col","text-end"],["type","button",1,"btn","bulkEditMobile-toggle",3,"click","ngClass"],[3,"ngbCollapse"],[1,"form-group","mt-2"],["bindLabel","name","labelForId","bulkActionDropDown",1,"bulkEdit-select",3,"ngModelChange","change","clearable","items","placeholder","searchable","ngModel"],["type","button",1,"btn","btn-block","btn-secondary",3,"click","disabled"],[3,"addToCart","itemToggled","remove","articleNumberMode","item","markItem"]],template:function(o,e){o&1&&(a(0,"div",0),_(1),d(2,"cxTranslate"),c(),a(3,"div",1)(4,"button",2),u("click",function(){return e.isCollapsedAddArticle=!e.isCollapsedAddArticle}),a(5,"div",3)(6,"div",4),_(7),d(8,"cxTranslate"),c(),a(9,"div",5),y(10,"cx-icon",6),c()()(),a(11,"div",7)(12,"foerch-quick-add-entry",8),u("addToCart",function(f){return e.onAddProducts(f)}),c()()(),v(13,We,23,25,"ng-container",9)),o&2&&(t(),b(" ",s(2,7,"reminderDetails.products"),` `),t(2),r("ngClass",F(11,Ve,!e.isCollapsedAddArticle)),t(4),b(" ",s(8,9,"cartHeader.addArticle")," "),t(3),r("type",e.iconTypes.ARROW_DOWN),t(),r("ngbCollapse",e.isCollapsedAddArticle),t(),r("cartMode",e.cartMode),t(),r("ngIf",!e.isEmptyList))},dependencies:[Q,z,M,I,ie,V,N,O,X,re,Te,B],encapsulation:2,changeDetection:0});let n=l;return n})();var He=()=>["/","my-account","reminders"];function je(n,l){if(n&1){let i=x();a(0,"button",9),u("click",function(){g(i);let o=p();return C(o.confirmDialog())}),_(1),d(2,"cxTranslate"),c()}n&2&&(t(),b(" ",s(2,1,"common.delete")," "))}var ut=(()=>{let l=class l extends he{};l.\u0275fac=(()=>{let m;return function(e){return(m||(m=q(l)))(e||l)}})(),l.\u0275cmp=k({type:l,selectors:[["foerch-reminder-mobile-details"]],features:[T],decls:25,vars:22,consts:[[1,"reminderDetailHead"],["type","button",1,"btn","btn-tertiary","btn-back",3,"routerLink"],[3,"type"],[1,"h3"],[3,"valueUpdate","reminder"],[3,"productsAdded","productsRemoved","products"],[3,"documentAdded","documentRemoved","documentTitleModified","documents"],[1,"row","reminderDetailFooter"],[1,"col-12"],[1,"btn","btn-link_secondary","btn-block","text-center",3,"click"],["class","btn btn-link_secondary btn-block text-center",3,"click",4,"ngIf"],[1,"col-12","col-sm-6"],[1,"btn","btn-secondary","btn-block",3,"click"],[1,"btn","btn-primary","btn-block",3,"click"]],template:function(o,e){o&1&&(a(0,"div",0)(1,"button",1),y(2,"cx-icon",2),_(3),d(4,"cxTranslate"),c(),a(5,"div",3),_(6),d(7,"cxTranslate"),c()(),a(8,"foerch-reminder-form",4),u("valueUpdate",function(f){return e.reminderChanged(f)}),c(),a(9,"foerch-reminder-mobile-product-list",5),u("productsAdded",function(f){return e.onProductsAdded(f)})("productsRemoved",function(f){return e.onProductsRemoved(f)}),c(),a(10,"foerch-reminder-mobile-document-list",6),u("documentAdded",function(f){return e.onDocumentAdded(f)})("documentRemoved",function(f){return e.onDocumentRemoved(f)})("documentTitleModified",function(f){return e.onDocumentTitleModified(f)}),c(),a(11,"div",7)(12,"div",8)(13,"button",9),u("click",function(){return e.generateProofDocument()}),_(14),d(15,"cxTranslate"),c(),v(16,je,3,3,"button",10),c(),a(17,"div",11)(18,"button",12),u("click",function(){return e.backToList()}),_(19),d(20,"cxTranslate"),c()(),a(21,"div",11)(22,"button",13),u("click",function(){return e.save()}),_(23),d(24,"cxTranslate"),c()()()),o&2&&(t(),r("routerLink",A(21,He)),t(),r("type",e.icons.ARROW_LEFT),t(),b("",s(4,11,"common.back")," "),t(3),b(" ",s(7,13,e.isNew?"reminderDetails.createReminder":"reminderDetails.editReminder")," "),t(2),r("reminder",e.reminder),t(),r("products",e.reminder==null?null:e.reminder.products),t(),r("documents",e.reminder==null?null:e.reminder.documents),t(4),b(" ",s(15,15,"reminderDetails.generateProofPDF")," "),t(2),r("ngIf",!e.isNew),t(3),b(" ",s(20,17,"common.cancel")," "),t(4),b(" ",s(24,19,"common.save")," "))},dependencies:[M,L,I,se,ue,Fe,B],encapsulation:2,changeDetection:0});let n=l;return n})();export{ut as a};