import{a as d}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 n}from"./chunk-S3ADKFO2.js";import"./chunk-I5MYHHJE.js";import{Fb as r,Ib as o,gb as a,lb as l}from"./chunk-CKLXM6EG.js";import"./chunk-TSRGIXR5.js";var c=class s{constructor(i){this.translate=i;this.buildHighlightStyles(),this.translate.onLangChange.subscribe(()=>{this.buildHighlightStyles()})}translationPrefix="PricingDeals";Field=[];ngOnInit(){this.Field=[{type:"select",title:"status",class:"col-3",options:[{name:this.translate.instant("status.available"),id:1},{name:this.translate.instant("status.expired"),id:0}],controlName:"status"},{type:"dateWithOptions",title:"date_range",controlName:"date",fromControlName:"from",toControlName:"to",showQuickButtons:!0,class:"col-6",parentClass:"col-6"},{type:"select",title:"vendors",options:[],class:"col-3",controlName:"vendor_id",optionsUrl:"procurement/public/vendor"},{type:"select",title:"deal_type",options:[{name:this.translate.instant("one_time"),id:"one_time"},{name:this.translate.instant("contract"),id:"contract"}],class:"col-3",controlName:"deal_type"}]}Menu=[{label:"show",action:"show",routerLink:"/pricing-deals/show-pricing-deal"},{label:"edit",action:"edit",routerLink:"/pricing-deals/edit-pricing-deal"},{label:"delete",action:"delete",permission:"delete pricing_deal"}];floorsHeaders=["id","pd_number","vendor.name","deal_type.value","start","end","item_count","created_at","updated_at","status.value"];rejectedStyle={color:"red",backgroundColor:"#FFEBEE",fontWeight:"bold",padding:"10px",borderRadius:"5px",whiteSpace:"nowrap"};submittedStyle={color:"rgb(29, 135, 2)",backgroundColor:"#1D870214",fontWeight:"bold",padding:"10px",borderRadius:"5px",whiteSpace:"nowrap"};buildHighlightStyles(){let i=this.translate.instant("status.available"),e=this.translate.instant("status.expired");this.tableHighlightedFields={"status.value":{fieldToCheck:"status.value",stylesByValue:{[i]:this.submittedStyle,[e]:this.rejectedStyle,__other__:this.submittedStyle},defaultStyle:this.submittedStyle}}}tableHighlightedFields={};static \u0275fac=function(e){return new(e||s)(a(n))};static \u0275cmp=l({type:s,selectors:[["app-pricing-deals-list"]],decls:1,vars:15,consts:[["classesForTable","designOne","routeAfterSuccess","/pricing-deals","routeOfButton2","add-pricing-deal","iconOfBtn2","fa-solid fa-plus","url","procurement/pricingdeals","titleOfPage","pricing-deals","deleteRowUrl","procurement/pricingdeals","deleteRowUrls","procurement/pricingdeals","titleOfButton2","add",3,"showCheckboxes","ShowModal","showSearch","showIconBtn2","headers","translationPrefixx","showMenubar","Menu","showBreadcrumb","showFilter","filterKeyData","filterSearchField","bulkmode","useCustomStatusStyling","tableHighlightedFields"]],template:function(e,t){e&1&&o(0,"app-page-body",0),e&2&&r("showCheckboxes",!0)("ShowModal",!1)("showSearch",!0)("showIconBtn2",!0)("headers",t.floorsHeaders)("translationPrefixx",t.translationPrefix)("showMenubar",!0)("Menu",t.Menu)("showBreadcrumb",!0)("showFilter",!0)("filterKeyData",t.floorsHeaders)("filterSearchField",t.Field)("bulkmode",!0)("useCustomStatusStyling",!1)("tableHighlightedFields",t.tableHighlightedFields)},dependencies:[d],encapsulation:2})};export{c as PricingDealsList};
