import{a as me}from"./chunk-33S3Y2LM.js";import{a as pe}from"./chunk-RFCZMTXP.js";import{b as _e}from"./chunk-UIGFCYGO.js";import{a as ne,b as se}from"./chunk-KSMXA3C7.js";import{d as re,e as ce}from"./chunk-4ENQACUL.js";import{a as ae}from"./chunk-4SQV5SMO.js";import{a as le}from"./chunk-ANRCCD2N.js";import{a as oe}from"./chunk-B4H3G55F.js";import{H as te,J as ie}from"./chunk-CWWVHRJU.js";import{a as Y}from"./chunk-RU43IR5J.js";import{a as Z}from"./chunk-Y7IP5WLG.js";import{a as X}from"./chunk-SU6CJJJO.js";import{a as ee}from"./chunk-HBJ2IG4O.js";import{r as Q}from"./chunk-MXUIPT66.js";import{Aa as p,Ab as f,Ba as m,Bb as x,Cb as y,Db as v,Dc as H,Df as z,Fb as E,Gd as N,Jd as U,Kb as b,Kd as W,Lb as r,Ua as c,Va as C,Vc as L,Wg as J,Xc as $,Yb as h,_b as g,bd as q,gb as j,gf as G,ib as u,ic as T,ob as l,pc as O,rc as s,sc as _,ta as R,yh as K,zb as d}from"./chunk-N6B2OJOY.js";var Ce=(n,a,t,e,i,o,F)=>({totalPrice:n,isEProcurementCart:a,onlyEProcurementOrders:t,checkoutInfo:e,shouldShowPromotionHintBox:i,unqualifiedEntriesForPromotion:o,bulkActionOptions:F}),de=()=>({cxRoute:"checkout"}),fe=()=>({cxRoute:"login"});function ue(n,a){n&1&&x(0,"foerch-promotion-banner")}function he(n,a){n&1&&x(0,"foerch-promotion-unqualified-hint-box")}function ge(n,a){if(n&1&&(y(0),x(1,"foerch-promotion-progress-bar"),u(2,he,1,0,"foerch-promotion-unqualified-hint-box",0),v()),n&2){let t=r().ngIf;c(2),l("ngIf",t.shouldShowPromotionHintBox)}}function be(n,a){if(n&1&&(d(0,"div",10)(1,"div",11)(2,"button",12),s(3,"cxUrl"),h(4),s(5,"cxTranslate"),f()()()),n&2){let t=r().ngIf,e=r();c(2),l("disabled",e.isNavigatingToCheckout()||e.footerConfig.disableAll||e.hasAnyDeletedArticle||!e.footerConfig.showCheckout||(t.checkoutInfo==null?null:t.checkoutInfo.allowed)===!1)("routerLink",_(3,3,T(7,de))),c(2),g(" ",_(5,5,"cartDetails.proceedToCheckout")," ")}}function xe(n,a){n&1&&(d(0,"button",19),s(1,"cxUrl"),h(2),s(3,"cxTranslate"),f()),n&2&&(l("routerLink",_(1,2,T(6,fe))),c(2),g(" ",_(3,4,"cartDetails.login")," "))}function ye(n,a){if(n&1){let t=E();y(0),d(1,"div",13)(2,"div",14)(3,"div",15),h(4),s(5,"cxTranslate"),f()()(),d(6,"div",16)(7,"div",14),u(8,xe,4,7,"button",17),d(9,"button",18),b("click",function(){p(t);let i=r(2);return m(i.navigateToCatalog())}),h(10),s(11,"cxTranslate"),f()()(),v()}if(n&2){let t=r(2);c(4),g(" ",_(5,3,"cartDetails.emptyCart")," "),c(4),l("ngIf",!t.isLoggedIn),c(2),g(" ",_(11,5,"cartDetails.shopNow")," ")}}function ve(n,a){if(n&1){let t=E();d(0,"foerch-cart-mobile-footer",22),b("applyBulkAction",function(i){p(t);let o=r(3);return m(o.applyBulkAction(i))})("markToggle",function(){p(t);let i=r(3);return m(i.toggleAll())})("transferEProcurementCart",function(){p(t);let i=r(3);return m(i.placeDirectEProcurementOrder())}),f()}if(n&2){let t=r(2).ngIf,e=r();l("bulkOptions",t.bulkActionOptions)("footerConfig",e.footerConfig)("hasAnyDeletedArticle",e.hasAnyDeletedArticle)("isEProcurementCart",t.isEProcurementCart)("isNavigatingToCheckout",e.isNavigatingToCheckout())("selectAll",e.selectionHelper.areAllSelected())("shouldDisableElements",(t.checkoutInfo==null?null:t.checkoutInfo.allowed)===!1)("totalPrice",t.totalPrice)}}function Ee(n,a){if(n&1){let t=E();y(0),d(1,"foerch-cart-mobile-body",20),b("applyCostCenterToEntry",function(i){p(t);let o=r(2);return m(o.applyCcmToEntry(i))})("markEntry",function(i){p(t);let o=r(2);return m(o.markCartEntry(i))})("removeEntry",function(i){p(t);let o=r(2);return m(o.removeCartEntry(i))})("replaceArticle",function(i){p(t);let o=r(2);return m(o.replaceArticle(i))})("sortingChange",function(i){p(t);let o=r(2);return m(o.sortingChange(i))})("sortingReset",function(){p(t);let i=r(2);return m(i.sortingReset())})("updateComment",function(i){p(t);let o=r(2);return m(o.updateEntryComment(i))})("vpeChange",function(i){p(t);let o=r(2);return m(o.onVpeChange(i))}),f(),u(2,ve,1,8,"foerch-cart-mobile-footer",21),v()}if(n&2){let t=r().ngIf,e=r();c(),l("cartConfig",e.cartConfig)("checkoutInfo",t.checkoutInfo)("isLoading$",e.isCartLoading$)("items",e.cartEntries)("selectionHelper",e.selectionHelper)("sortableColumns",e.sortableColumns)("sortModel",e.sortModel)("totalPrice",t.totalPrice)("unqualifiedEntriesForPromotion",t.unqualifiedEntriesForPromotion),c(),l("ngIf",!e.isEProcurementOrderInProcess)}}function Fe(n,a){if(n&1){let t=E();y(0),d(1,"div",1),u(2,ge,3,1,"ng-container",0),d(3,"div",2)(4,"div",3)(5,"div",4)(6,"button",5),b("click",function(){p(t);let i=r();return m(i.navigateToCatalog())}),x(7,"cx-icon",6),h(8),s(9,"cxTranslate"),f()(),d(10,"div",4)(11,"div",7),h(12),s(13,"cxTranslate"),f()(),u(14,be,6,8,"div",8),f(),u(15,ye,12,7,"ng-container",0),f()(),d(16,"foerch-cart-mobile-head",9),s(17,"async"),b("addToCart",function(i){p(t);let o=r();return m(o.quickAddEntriesToCart(i))})("applyCCM",function(i){p(t);let o=r();return m(o.applyCostCenterAndObject(i))}),f(),u(18,Ee,3,10,"ng-container",0),v()}if(n&2){let t=a.ngIf,e=r();c(2),l("ngIf",!e.isEmptyCart),c(3),l("ngClass",e.isEmptyCart?"col-sm-4":"col-sm-auto"),c(2),l("type",e.iconTypes.ARROW_LEFT),c(),g(" ",_(9,12,"cartDetails.proceedToShopping")," "),c(2),l("ngClass",e.isEmptyCart?"col-sm-4":"col-sm"),c(2),g(" ",_(13,14,"cartDetails.cartName")," "),c(2),l("ngIf",!(e.isEmptyCart||t.isEProcurementCart||t.onlyEProcurementOrders)),c(),l("ngIf",e.isEmptyCart),c(),l("headerConfig",e.headerConfig)("isCartRefreshed",_(17,16,e.isCartRefreshed$))("isEmptyCart",e.isEmptyCart),c(2),l("ngIf",!e.isEmptyCart)}}var _t=(()=>{let a=class a extends se{constructor(e,i,o,F,I,k,w,P,D,S,M,A,V,B){super(e,i,o,F,I,k,w,P,D,S,M,A,V,B),this.activeCartService=e,this.watchlistService=i,this.authService=o,this.modalService=F,this.categoriesService=I,this.routingService=k,this.eProcurementService=w,this.permissionService=P,this.enhancedECommerceService=D,this.globalMessageService=S,this.router=M,this.activatedRoute=A,this.cd=V,this.promotionsService=B}};a.\u0275fac=function(i){return new(i||a)(C(ie),C(X),C(G),C(Z),C(le),C(ee),C(te),C(Y),C(ae),C(z),C(U),C(N),C(H),C(oe))},a.\u0275cmp=R({type:a,selectors:[["foerch-cart-mobile-details"]],features:[j],decls:9,vars:24,consts:[[4,"ngIf"],[1,"container"],[1,"cartHead"],[1,"row","align-items-center"],[1,"col-12",3,"ngClass"],["type","button",1,"btn","btn-tertiary","btn-back",3,"click"],[3,"type"],[1,"h2","cartHead-title","text-sm-center"],["class","col-12 col-sm-auto",4,"ngIf"],[3,"addToCart","applyCCM","headerConfig","isCartRefreshed","isEmptyCart"],[1,"col-12","col-sm-auto"],[1,"text-end","d-none","d-sm-block"],["type","button",1,"btn","btn-commerce",3,"disabled","routerLink"],[1,"row","mt-3","mb-4"],[1,"col-12","text-sm-center"],[1,"emptyState-text"],[1,"row","pb-2"],["class","btn btn-secondary btn-wider me-2 mb-1","type","button",3,"routerLink",4,"ngIf"],["type","button",1,"btn","btn-primary","btn-wider","mb-1",3,"click"],["type","button",1,"btn","btn-secondary","btn-wider","me-2","mb-1",3,"routerLink"],[3,"applyCostCenterToEntry","markEntry","removeEntry","replaceArticle","sortingChange","sortingReset","updateComment","vpeChange","cartConfig","checkoutInfo","isLoading$","items","selectionHelper","sortableColumns","sortModel","totalPrice","unqualifiedEntriesForPromotion"],[3,"bulkOptions","footerConfig","hasAnyDeletedArticle","isEProcurementCart","isNavigatingToCheckout","selectAll","shouldDisableElements","totalPrice","applyBulkAction","markToggle","transferEProcurementCart",4,"ngIf"],[3,"applyBulkAction","markToggle","transferEProcurementCart","bulkOptions","footerConfig","hasAnyDeletedArticle","isEProcurementCart","isNavigatingToCheckout","selectAll","shouldDisableElements","totalPrice"]],template:function(i,o){i&1&&(u(0,ue,1,0,"foerch-promotion-banner",0)(1,Fe,19,18,"ng-container",0),s(2,"async"),s(3,"async"),s(4,"async"),s(5,"async"),s(6,"async"),s(7,"async"),s(8,"async")),i&2&&(l("ngIf",o.cartConfig.showPromotions),c(),l("ngIf",O(16,Ce,_(2,2,o.subTotalPrice$),_(3,4,o.isEProcurementCart$),_(4,6,o.onlyEProcurementOrders$),_(5,8,o.checkoutInfo$),_(6,10,o.shouldShowPromotionHintBox$),_(7,12,o.unqualifiedEntriesForPromotion$),_(8,14,o.bulkActionOptions$))))},dependencies:[L,$,W,me,_e,pe,ne,re,ce,Q,K,q,J],encapsulation:2,changeDetection:0});let n=a;return n})();export{_t as a};