1import{a as Y}from"./chunk-F57RPCV3.js";import"./chunk-7J744ZUK.js";import"./chunk-WV2SMW27.js";import"./chunk-VFRTQ4PT.js";import"./chunk-3D5HQ2RC.js";import"./chunk-75BGI26G.js";import"./chunk-ZUIEGIAL.js";import"./chunk-PKUOWFMG.js";import"./chunk-PFM5JSVJ.js";import"./chunk-EKSIETNV.js";import"./chunk-J5CFSPOG.js";import"./chunk-HG2U6EBH.js";import"./chunk-RKAUUY53.js";import"./chunk-ZXAHFPMY.js";import"./chunk-D2I5NLFD.js";import"./chunk-X7YAYGF7.js";import"./chunk-2EFXPOTT.js";import"./chunk-ZYH37D7B.js";import"./chunk-KLPUMFLS.js";import"./chunk-THSM2T4S.js";import"./chunk-S7JIYYMP.js";import"./chunk-TV2RN4RR.js";import"./chunk-LIB7VMNY.js";import"./chunk-R5M2FGLW.js";import"./chunk-UPBF4N2S.js";import"./chunk-NBHXEULC.js";import"./chunk-UH62HCTJ.js";import"./chunk-6MZQVTP4.js";import{b as Q,w as U,x as X}from"./chunk-6RZC52T6.js";import{E as K,b as q,f as G,m as J}from"./chunk-GE7A26O5.js";import{nd as W,od as j}from"./chunk-WGYJ4VNB.js";import"./chunk-G6JVTTHL.js";import{e as O}from"./chunk-HTNLXQUD.js";import"./chunk-N56O2TJA.js";import{Ad as p,Bc as L,Bd as P,Cc as y,Cd as R,Dc as _,Ec as s,Fc as c,Gc as F,Ib as a,Ma as m,Na as d,Nd as x,Od as M,Qc as u,Ya as H,Yd as B,_a as V,_c as h,ac as D,ad as l,fc as E,gc as N,hc as A,pc as S,pd as f,qd as $,rc as I,rd as w,tc as z,w as k,wc as C,yc as b,yd as T,zd as g}from"./chunk-WI74XH4H.js";import"./chunk-RFT5DLLE.js";var ee=()=>[import("./chunk-D7LR42IZ.js").then(i=>i.FoerchTableResetMobileComponent)],te=()=>[import("./chunk-7BGGAJBU.js").then(i=>i.FoerchHgmArticleListItemMobileComponent)],ie=(i,t)=>t.label,ne=(i,t)=>t.hazMatNumber;function oe(i,t){if(i&1&&(s(0,"div",6),F(1,"input",7),s(2,"label",8),f(3),c()()),i&2){let e=t.index,n=t.item,o=t.item$;a(),_("id",R("item-",e))("ngModel",o.selected),a(),_("title",P(n.displayName)),a(),w(" ",n.displayName," ")}}function re(i,t){if(i&1){let e=u();s(0,"div",1)(1,"div",3)(2,"ng-select",4),x(3,"cxTranslate"),h("change",function(o){m(e);let r=l();return d(r.onStatusSelectionChange(o))}),N(4,oe,4,6,"ng-template",5),c()()()}if(i&2){let e=l();a(2),_("clearable",!0)("fixedPlaceholder",!0)("items",e.articleStatusOptions())("multiple",!0)("ngModel",e.selectedArticleStatus())("placeholder",M(3,7,"workingAreas.details.status"))("searchable",!1)}}function ae(i,t){if(i&1){let e=u();s(0,"div",2)(1,"input",9),h("click",function(){let o=m(e).$implicit,r=l();return d(r.toggleFilter(o))}),c(),s(2,"label",10),f(3),x(4,"cxTranslate"),c()()}if(i&2){let e=t.$implicit,n="workingArea_filter_"+e.toggleType;a(),_("checked",e.isActive)("id",n),a(),_("for",n),a(),$(M(4,4,e.label))}}function le(i,t){if(i&1){let e=u();s(0,"foerch-table-reset-mobile",15),h("resetSorting",function(){m(e);let o=l(2);return d(o.onSortingResetMobile())}),c()}if(i&2){let e=l(2);_("enabled",e.hasActiveSorting())}}function se(i,t){i&1&&F(0,"span")}function ce(i,t){if(i&1){let e=u();s(0,"foerch-hgm-article-list-item-mobile",16),h("addToCart",function(o){m(e);let r=l(3);return d(r.onAddToCart(o))})("editItem",function(o){m(e);let r=l(3);return d(r.onEditArticle(o))})("saveItem",function(o){m(e);let r=l(3);return d(r.onSaveArticle(o))}),c()}if(i&2){let e=l().$implicit;l();let n=p(7),o=p(8),r=p(9);l();let v=p(1);_("hgmArticle",e)("isEditMode",o===e.code)("isLoading",n)("presentationMode",v)("workingAreaCode",r)}}function me(i,t){i&1&&(A(0,ce,1,5),S(1,0,te),z(10,1))}function de(i,t){if(i&1){let e=u();s(0,"div",11)(1,"div",12)(2,"ng-select",13),h("change",function(o){m(e);let r=l();return d(r.onSortingChangeMobile(o))})("ngModelChange",function(o){m(e);let r=l();return d(r.selectedSort.set(o))}),c(),A(3,le,1,1)(4,se,1,0),S(5,3,ee,null,4),I(),c()(),T(7)(8)(9),s(10,"div",14,0),L(12,me,3,0,null,null,ne),c()}if(i&2){let e=l(),n=p(0),o=p(2);a(2),_("clearable",!1)("items",e.sortItems())("ngModel",e.selectedSort())("searchable",!1),a(5),g(e.isCartLoading()||o),a(),g(e.editableArticleCode()),a(),g(e.workingAreaCode()),a(3),y(n)}}function _e(i,t){if(i&1&&(s(0,"div",17)(1,"div",3)(2,"div",18),f(3),x(4,"cxTranslate"),c()()()),i&2){let e=l(2);a(3),w(" ",M(4,1,e.areFiltersActive()||e.isToggleActive()?"workingAreas.details.noFilteredArticles":"workingAreas.details.noArticlesAttached")," ")}}function pe(i,t){if(i&1&&C(0,_e,5,3,"div",17),i&2){l();let e=p(2);b(e?-1:0)}}var Z=class i extends Y{selectedSort=H(null);sortItems=B(()=>{let t=this._translations();if(!t)return[];let e=(o,r)=>`${t.sorting}: ${o} ${r}`,n=[{name:e(t.articleNumber,t.asc),value:"articleNumber_ASC"},{name:e(t.articleNumber,t.desc),value:"articleNumber_DESC"},{name:e(t.description,t.asc),value:"description_ASC"},{name:e(t.description,t.desc),value:"description_DESC"}];return this.presentationMode()!==2&&(n=[{name:e(t.hazMatNumber,t.asc),value:"hazMatNumber_ASC"},{name:e(t.hazMatNumber,t.desc),value:"hazMatNumber_DESC"}
1,...n,{name:e(t.status,t.asc),value:"status_ASC"},{name:e(t.status,t.desc),value:"status_DESC"}]),n});_translations=O(k({sorting:this.translationService.translate("common.sorting"),asc:this.translationService.translate("common.asc"),desc:this.translationService.translate("common.desc"),articleNumber:this.translationService.translate("workingAreas.details.articleNumber"),description:this.translationService.translate("workingAreas.details.description"),hazMatNumber:this.translationService.translate("workingAreas.details.hazMatNumber"),status:this.translationService.translate("workingAreas.details.status")}),{initialValue:null});constructor(){super(),V(()=>{let t=this.sortItems();t.length>0&&this.selectedSort()===null&&this.selectedSort.set(t[0].value)})}onSortingChangeMobile(t){let e=t.value.split("_"),n={sortBy:e[0],sortDirection:e[1]};this.sortChanged.emit(n)}onSortingResetMobile(){this.hasActiveSorting.set(!1),this.onSortingReset(),this.selectedSort.set(this.sortItems()[0]?.value??"")}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["foerch-hgm-article-list-mobile"]],features:[E],decls:8,vars:5,consts:[["itemWrapper",""],[1,"row","mb-2"],[1,"form-check","form-switch","ms-2"],[1,"col-12"],["bindLabel","displayName","bindValue","displayValue",1,"ng-select-multiple_checkbox",3,"change","clearable","fixedPlaceholder","items","multiple","ngModel","placeholder","searchable"],["ng-option-tmp",""],[1,"form-check","form-checkbox"],["role","checkbox","type","checkbox",1,"form-check-input",3,"id","ngModel"],[1,"form-check-label",3,"title"],["type","checkbox",1,"form-check-input",3,"click","checked","id"],[1,"form-check-label",3,"for"],[1,"row"],[1,"col-auto","d-flex","align-items-baseline"],["bindLabel","name","bindValue","value",1,"ng-select_alt","ng-select_wider",3,"change","ngModelChange","clearable","items","ngModel","searchable"],[1,"listMobile-wrapper"],[3,"resetSorting","enabled"],[1,"listMobileEntry",3,"addToCart","editItem","saveItem","hgmArticle","isEditMode","isLoading","presentationMode","workingAreaCode"],[1,"row","emptyState"],[1,"emptyState-text"]],template:function(e,n){if(e&1&&(T(0)(1)(2),C(3,re,5,9,"div",1),L(4,ae,5,6,"div",2,ie),C(6,de,14,7)(7,pe,1,1)),e&2){let o=g(n.articles());a();let r=g(n.presentationMode());a();let v=g(n.isLoading());a(),b(r!==n.hazMatModes.DATA_SHEET_SEARCH?3:-1),a(),y(n.toggleConfig()),a(2),b(!v&&(o==null?null:o.length)>0?6:7)}},dependencies:[K,q,G,J,j,X,U,Q,W],encapsulation:2,changeDetection:0})};export{Z as FoerchHgmArticleListMobileComponent};
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.