import{c as R,d as ae,e as pe}from"./chunk-EFG3IBOC.js";import{b as ce}from"./chunk-5OZTUYJC.js";import{a as oe}from"./chunk-6P46GKPE.js";import{a as re}from"./chunk-TRE4H2YK.js";import{a as ie}from"./chunk-Y7IP5WLG.js";import{r as V,t as P,x as ne}from"./chunk-MXUIPT66.js";import{$b as j,Aa as g,Ab as c,Ba as u,Bb as f,Cb as y,Db as h,Dc as H,Fb as b,Ge as Y,Jd as J,Kb as C,Kd as K,Lb as s,Ua as n,Va as I,Vc as q,Wc as M,Wg as ee,Xb as S,Xc as B,Yb as p,Zb as T,_b as d,bd as G,fh as te,gb as k,gd as z,ib as x,jc as A,kc as Q,lc as w,ob as v,qb as $,rc as a,rg as Z,sc as m,ta as O,vc as E,wc as F,yh as D,zb as l}from"./chunk-N6B2OJOY.js";var ge=t=>({active:t}),L=(t,o,e)=>[t,o,"symbol","1.2",e],ue=t=>({uid:t}),Ie=t=>({cxRoute:"countingList",params:t});function fe(t,o){t&1&&(y(0),l(1,"div",17)(2,"div",13),f(3,"cx-spinner"),c()(),h())}function Ce(t,o){if(t&1){let e=b();l(0,"div",19)(1,"div",20)(2,"div",11)(3,"div",12),p(4),a(5,"cxTranslate"),c(),p(6),a(7,"cxDate"),c(),l(8,"div",13)(9,"div",12),p(10),a(11,"cxTranslate"),c(),p(12),c()(),l(13,"div",21)(14,"div",11)(15,"div",12),p(16),a(17,"cxTranslate"),c(),p(18),c(),l(19,"div",13)(20,"div",12),p(21),a(22,"cxTranslate"),c(),p(23),a(24,"currency"),a(25,"currency"),c()(),l(26,"div",22)(27,"button",23),C("click",function(){let r=g(e).$implicit,_=s(5);return u(_.onSelectInventoryAction(_.inventoryAction.ADD_MISSING_TO_CART,r.pk))}),f(28,"cx-icon",10),p(29),a(30,"cxTranslate"),c(),l(31,"button",24),C("click",function(){let r=g(e).$implicit,_=s(5);return u(_.onSelectInventoryAction(_.inventoryAction.REPORT_WITHOUT_AMOUNTS,r.pk))}),f(32,"cx-icon",10),p(33),a(34,"cxTranslate"),c(),l(35,"button",24),C("click",function(){let r=g(e).$implicit,_=s(5);return u(_.onSelectInventoryAction(_.inventoryAction.EXPORT_AS_PDF,r.pk))}),f(36,"cx-icon",10),p(37),a(38,"cxTranslate"),c(),l(39,"button",24),C("click",function(){let r=g(e).$implicit,_=s(5);return u(_.onSelectInventoryAction(_.inventoryAction.EXPORT_AS_XLS,r.pk))}),f(40,"cx-icon",10),p(41),a(42,"cxTranslate"),c()()()}if(t&2){let e=o.$implicit,i=s(5);n(4),d(" ",m(5,18,"inventoryOverview.closingDate")," "),n(2),d(" ",m(7,20,e.closingDate)," "),n(4),d(" ",m(11,22,"inventoryOverview.closedBy")," "),n(2),d(" ",(e.user==null?null:e.user.name)||"-"," "),n(4),d(" ",m(17,24,"inventoryOverview.articleTargetActual")," "),n(2),j(" ",e.articleTargetCount," / ",e.articleActualCount," "),n(3),d(" ",m(22,26,"inventoryOverview.amountTargetActual")," "),n(2),j(" ",E(24,28,w(48,L,e.articleTargetAmount,i.currencyCode,i.localeCode))," / ",E(25,34,w(52,L,e.articleActualAmount,i.currencyCode,i.localeCode))," "),n(5),v("type",i.icons.CART),n(),d(" ",m(30,40,"inventoryOverview.addMissingArticlesToCart")," "),n(3),v("type",i.icons.PURCHASE_ORDER),n(),d(" ",m(34,42,"inventoryOverview.inventoryWithoutAmounts")," "),n(3),v("type",i.icons.PDF),n(),d(" ",m(38,44,"inventoryOverview.exportInventoryAsPDF")," "),n(3),v("type",i.icons.XLS),n(),d(" ",m(42,46,"inventoryOverview.exportInventoryAsXLS")," ")}}function ye(t,o){if(t&1&&(y(0),x(1,Ce,43,56,"div",18),h()),t&2){let e=s(4);n(),v("ngForOf",e.completedInventories)("ngForTrackBy",e.trackByIndex)}}function he(t,o){if(t&1&&x(0,ye,2,2,"ng-container",16),t&2){s(2);let e=S(29),i=s();v("ngIf",i.completedInventories.length>0)("ngIfElse",e)}}function be(t,o){if(t&1&&(y(0),l(1,"div",14)(2,"a",15),a(3,"cxUrl"),p(4),a(5,"cxTranslate"),c()(),x(6,fe,4,0,"ng-container",16)(7,he,1,2,"ng-template",null,1,F),h()),t&2){let e=S(8),i=s(2);n(2),v("routerLink",m(3,4,A(10,Ie,A(8,ue,i.item.costCenter.code)))),n(2),d(" ",m(5,6,"inventoryOverview.countingList")," "),n(2),v("ngIf",i.isLoading)("ngIfElse",e)}}function Se(t,o){t&1&&(l(0,"div",25)(1,"div",26),p(2),a(3,"cxTranslate"),c()()),t&2&&(n(2),d(" ",m(3,1,"inventoryOverview.noCompletedInventories")," "))}function Te(t,o){if(t&1){let e=b();y(0),l(1,"div",3)(2,"div",4)(3,"div",5),p(4),c(),l(5,"div",6)(6,"div",7)(7,"div",8)(8,"button",9),C("click",function(){g(e);let r=s();return u(r.toggleListOfCompletedInventories())}),f(9,"cx-icon",10),c()()()()(),l(10,"div",4)(11,"div",11)(12,"div",12),p(13),a(14,"cxTranslate"),c(),p(15),l(16,"span"),p(17),c()(),l(18,"div",13)(19,"div",12),p(20),a(21,"cxTranslate"),c(),p(22),a(23,"currency"),l(24,"span"),p(25),a(26,"currency"),c()()(),x(27,be,9,12,"ng-container",2),c(),x(28,Se,4,3,"ng-template",null,0,F),h()}if(t&2){let e=s();n(4),T(e.item.costCenter.name),n(4),v("ngClass",A(30,ge,e.isExpanded)),n(),v("type",e.icons.ARROW_DOWN),n(4),d(" ",m(14,14,"inventoryOverview.articleTargetActual")," "),n(2),d(" ",e.item.articleTargetCount," / "),n(),$("text-secondary",e.item.articleActualCount<e.item.articleTargetCount),n(),T(e.item.articleActualCount),n(3),d(" ",m(21,16,"inventoryOverview.amountTargetActual")," "),n(2),d(" ",E(23,18,w(32,L,e.item.articleTargetAmount,e.currencyCode,e.localeCode))," / "),n(2),$("text-secondary",e.item.articleActualAmount<e.item.articleTargetAmount),n(),T(E(26,24,w(36,L,e.item.articleActualAmount,e.currencyCode,e.localeCode))),n(2),v("ngIf",e.isExpanded)}}var le=(()=>{let o=class o extends ae{constructor(i,r){super(i,r),this.inventoriesService=i,this.cd=r}ngOnInit(){super.ngOnInit()}ngOnDestroy(){super.ngOnDestroy()}};o.\u0275fac=function(r){return new(r||o)(I(R),I(H))},o.\u0275cmp=O({type:o,selectors:[["foerch-inventories-item-mobile"]],features:[k],decls:1,vars:1,consts:[["noCompletedInventories",""],["listOfCompletedInventories",""],[4,"ngIf"],[1,"inventories-item"],[1,"row"],[1,"col","mb-2"],[1,"col-auto"],[1,"cartEntry-action-wrapper"],[1,"cartEntry-action"],[1,"btn-icon","cartEntry-action-arrow",3,"click","ngClass"],[3,"type"],[1,"col-5"],[1,"text-nowrap","inventories-label"],[1,"col"],[1,"my-2","mw-sm-md-400"],[1,"btn","btn-primary","btn-sm","btn-block",3,"routerLink"],[4,"ngIf","ngIfElse"],[1,"row","mb-4"],["class","inventories-completed mt-2",4,"ngFor","ngForOf","ngForTrackBy"],[1,"inventories-completed","mt-2"],[1,"row","my-2"],[1,"row","mb-2"],[1,"mw-sm-md-400"],[1,"btn","btn-commerce","btn-block",3,"click"],[1,"btn","btn-secondary","btn-block",3,"click"],[1,"inventories-completed"],[1,"emptyState-text","text-center","mt-2","mx-auto"]],template:function(r,_){r&1&&x(0,Te,30,40,"ng-container",2),r&2&&v("ngIf",_.item)},dependencies:[q,M,B,K,V,P,z,D,te,ee],encapsulation:2,changeDetection:0});let t=o;return t})();var we=(t,o)=>({currencyCode:t,localeCode:o});function Ee(t,o){if(t&1&&f(0,"foerch-inventories-item-mobile",15),t&2){let e=o.$implicit,i=s(3).ngIf;v("currencyCode",i.currencyCode)("item",e)("localeCode",i.localeCode)}}function Oe(t,o){if(t&1&&(l(0,"div",13),x(1,Ee,1,3,"foerch-inventories-item-mobile",14),c()),t&2){let e=o.ngIf,i=s(3);n(),v("ngForOf",e.results)("ngForTrackBy",i.trackByIndex)}}function ke(t,o){if(t&1){let e=b();y(0),x(1,Oe,2,2,"div",11),a(2,"async"),l(3,"foerch-paging",12),C("viewChangePageEvent",function(r){g(e);let _=s(2);return u(_.onPageChangeMobile(r))}),c(),h()}if(t&2){let e=s(2);n(),v("ngIf",m(2,3,e.items$)),n(2),v("isMobile",!0)("pagination",e.pagination)}}function Ae(t,o){if(t&1&&(y(0),l(1,"div",16)(2,"div",17),p(3),a(4,"cxTranslate"),c()(),h()),t&2){let e=s(3);n(3),d(" ",m(4,1,e.searchQuery?"inventoryOverview.noInventoriesMatchQuery":"inventoryOverview.noInventories")," ")}}function Me(t,o){if(t&1&&(x(0,Ae,5,3,"ng-container",10),a(1,"async")),t&2){s();let e=S(20),i=s();v("ngIf",m(1,2,i.isLoaded$)===!0)("ngIfElse",e)}}function Be(t,o){t&1&&f(0,"cx-spinner")}function De(t,o){if(t&1){let e=b();y(0),l(1,"h3",3),p(2),a(3,"cxTranslate"),c(),l(4,"button",4),C("click",function(){g(e);let r=s();return u(r.addCustomerArticleDialog())}),f(5,"cx-icon",5),p(6),a(7,"cxTranslate"),c(),l(8,"foerch-search-input",6),C("searchString",function(r){g(e);let _=s();return u(_.onQueryChange(r))}),c(),l(9,"div",7)(10,"div",8)(11,"button",9),C("click",function(){g(e);let r=s();return u(r.showDiagramModal())}),p(12),a(13,"cxTranslate"),c()()(),x(14,ke,4,5,"ng-container",10),a(15,"async"),a(16,"async"),x(17,Me,2,4,"ng-template",null,0,F)(19,Be,1,0,"ng-template",null,1,F),h()}if(t&2){let e=S(18),i=s();n(2),T(m(3,6,"inventoryOverview.inventory")),n(3),v("type",i.icons.PLUS),n(),d(" ",m(7,8,"inventoryOverview.addCustomerArticles")," "),n(6),d(" ",m(13,10,"inventoryOverview.showDiagram")," "),n(2),v("ngIf",m(15,12,i.isLoaded$)===!0&&m(16,14,i.isEmpty$)!==!0)("ngIfElse",e)}}var ze=(()=>{let o=class o extends pe{constructor(i,r,_,N,U,X,W){super(i,r,_,N,U,X,W),this.inventoriesService=i,this.userIdService=r,this.breakpointService=_,this.currencyService=N,this.currencyLocaleService=U,this.modalService=X,this.router=W}};o.\u0275fac=function(r){return new(r||o)(I(R),I(Y),I(ne),I(Z),I(ce),I(ie),I(J))},o.\u0275cmp=O({type:o,selectors:[["foerch-inventories-mobile"]],features:[k],decls:3,vars:8,consts:[["noInventories",""],["loading",""],[4,"ngIf"],[1,"mb-3"],["type","button",1,"btn","btn-primary","btn-block","btn-icon_left","mw-sm-md-400","mb-2",3,"click"],[3,"type"],["placeholder","inventoryOverview.queryForCostCenter",3,"searchString"],[1,"row"],[1,"col-auto","ms-auto","text-end"],[1,"btn","btn-link_secondary",3,"click"],[4,"ngIf","ngIfElse"],["class","inventories-wrapper mx-n2",4,"ngIf"],["buttonLabel","inventoryOverview.loadMoreCostCenters",3,"viewChangePageEvent","isMobile","pagination"],[1,"inventories-wrapper","mx-n2"],[3,"currencyCode","item","localeCode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"currencyCode","item","localeCode"],[1,"emptyState"],[1,"emptyState-text"]],template:function(r,_){r&1&&(x(0,De,21,16,"ng-container",2),a(1,"async"),a(2,"async")),r&2&&v("ngIf",Q(5,we,m(1,1,_.currency$),m(2,3,_.locale$)))},dependencies:[M,B,oe,re,V,P,le,G,D],encapsulation:2,changeDetection:0});let t=o;return t})();export{ze as a};