import{a as p}from"./chunk-ABXDWOZI.js";import"./chunk-4NGHU5PZ.js";import"./chunk-NWOU67BD.js";import"./chunk-TBSUMTHM.js";import"./chunk-CKJJI5MU.js";import"./chunk-TAT3HGQ4.js";import"./chunk-4SWKWV3M.js";import"./chunk-DY645AKB.js";import"./chunk-5I5ZFUTL.js";import"./chunk-QN66BDDM.js";import"./chunk-JBNKEIUX.js";import"./chunk-5SW267PH.js";import"./chunk-PU7DBJLZ.js";import"./chunk-3DDBG3AR.js";import"./chunk-5MLUVH77.js";import"./chunk-SMMBZMNL.js";import"./chunk-S5GA3KRV.js";import"./chunk-EFONMPAR.js";import"./chunk-YQXLYYOT.js";import"./chunk-6RITFGP2.js";import"./chunk-HGXDKXJP.js";import"./chunk-WQUXAKOL.js";import"./chunk-LYNKRDJC.js";import"./chunk-SKY4LXUD.js";import"./chunk-BZT47AWD.js";import"./chunk-5WQBRAHK.js";import"./chunk-4FTRQKHH.js";import"./chunk-BYXBJQAS.js";import"./chunk-TTWRMELT.js";import"./chunk-EMJ4QQUL.js";import"./chunk-QPCAJSKO.js";import"./chunk-QV67LFVX.js";import"./chunk-4O3FVBGX.js";import"./chunk-TGWIHQDX.js";import"./chunk-Q5KZV54I.js";import"./chunk-YHVRQUSB.js";import"./chunk-N7PBPSN6.js";import"./chunk-3Z7PXZF3.js";import"./chunk-43BLBOSI.js";import"./chunk-IWSLIKCG.js";import"./chunk-2DXJE6G7.js";import"./chunk-7RP244JU.js";import"./chunk-LHGSJXTX.js";import"./chunk-ZKNPBXGB.js";import{b as c}from"./chunk-S3ADKFO2.js";import"./chunk-I5MYHHJE.js";import{Fb as l,Ib as d,gb as s,lb as n}from"./chunk-CKLXM6EG.js";import{a,b as i}from"./chunk-TSRGIXR5.js";var m=class r{constructor(e){this.translate=e}itemss;floorsHeaders=["id","id_auto","product_name","current_quantity","min_limit","max_limit","created_at","updated_at","status"];filterField;titlesOfMenu=[{label:"show",action:"show",routerLink:"/settings/products/show_product"},{label:"edit",action:"edit",routerLink:"/settings/products/edit_product"},{label:"delete",action:"delete",paramName:"",permission:"delete products"}];dataTransform=e=>e.map(t=>i(a({},t),{current_quantity:this.extractQuantityValue(t.current_quantity)}));extractQuantityValue(e){return e==null?0:typeof e=="number"?e:typeof e=="object"&&e.quantity!==void 0&&Number(e.quantity)||0}ngOnInit(){this.filterField=[{type:"dateWithOptions",title:"date_range",controlName:"date",fromControlName:"from",toControlName:"to",showQuickButtons:!0,class:"col-6",parentClass:"col-4"},{type:"select",title:"category_id",controlName:"category_id",class:"col-2",optionsUrl:"procurement/public/category/show-categories",options:[],nestedName:"category"},{type:"select",title:"sub_category_id",controlName:"sub_category_id",class:"col-3",optionsUrl:"procurement/public/category/show-categories?child=true",options:[],nestedName:"category"},{type:"select",title:"brand_id",controlName:"brand_id",class:"col-3",optionsUrl:"procurement/public/brands/list",options:[]},{type:"select",title:"status",class:"col-3",options:[{name:this.translate.instant("yes"),id:"active"},{name:this.translate.instant("no"),id:"inactive"}],controlName:"status"}]}static \u0275fac=function(t){return new(t||r)(s(c))};static \u0275cmp=n({type:r,selectors:[["app-storage-and-inventory-limits"]],decls:1,vars:11,consts:[["url","procurement/product/product_brand?type=storage","translationPrefixx","storage_and_inventory_limits","titleOfPage","products","deleteRowUrl","branches/deleteBranch","classesForTable","designOne","iconOfBtn","fa-solid fa-plus","deleteRowUrl","inventory/product/delete",3,"Menu","filterKeyData","ShowModal","menuList","headers","dataTransform","showMenubar","filterSearchField","showFilter","showTitle","ShowButton2"]],template:function(t,o){t&1&&d(0,"app-page-body",0),t&2&&l("Menu",o.titlesOfMenu)("filterKeyData",o.floorsHeaders)("ShowModal",!1)("menuList",o.itemss)("headers",o.floorsHeaders)("dataTransform",o.dataTransform)("showMenubar",!0)("filterSearchField",o.filterField)("showFilter",!0)("showTitle",!1)("ShowButton2",!1)},dependencies:[p],encapsulation:2})};export{m as StorageAndInventoryLimits};
