import{a as w}from"./chunk-6KDTVFMW.js";import"./chunk-BYXBJQAS.js";import{Ad as W,Bb as f,Cc as v,Db as x,Dc as c,Fb as P,Gb as T,Hb as b,Ib as d,Jb as n,Kb as o,Kc as m,Lb as E,Mc as s,Qc as I,Rb as D,Vd as k,Xd as F,Za as l,Zb as u,hc as h,ib as S,ic as y,mc as a,nc as g,nd as B,ob as _,oc as C,sd as M,xd as O}from"./chunk-GJDGQISV.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var L=t=>({"table-border-bottom-0":t}),R=()=>["/menu/Products/Catalog/Products/Info"],$=t=>({ID:t}),q=t=>({ProductID:t}),A=()=>["/menu/Products/Catalog/Products"],Y=t=>({BrandID:t});function Q(t,r){if(t&1&&(n(0,"tr",11)(1,"td",8)(2,"a",12),a(3),o()(),n(4,"td",13)(5,"a",14),a(6),m(7,"number"),o()(),n(8,"td",15),a(9),m(10,"number"),o()()),t&2){let e=r.$implicit,i=r.$index,p=u(2);d("ngClass",c(13,L,(p.productData==null||p.productData.TopProduct==null?null:p.productData.TopProduct.length)==i+1)),l(2),d("routerLink",v(15,R))("queryParams",c(16,$,e.ID)),l(),C(" ",e==null?null:e.Name," "),l(2),d("queryParams",c(18,q,e.ID)),l(),C(" ",s(7,7,e==null?null:e.Quantity,"1.0-0")," "),l(3),g(s(10,10,e==null?null:e.Total,"1.0-0"))}}function j(t,r){if(t&1&&T(0,Q,11,20,"tr",11,P),t&2){let e=u();b(e.productData==null?null:e.productData.TopProduct)}}function z(t,r){t&1&&D(0)}function G(t,r){if(t&1&&_(0,z,1,0,"ng-container",16),t&2){u();let e=h(38);d("ngTemplateOutlet",e)}}function H(t,r){if(t&1&&(n(0,"tr",11)(1,"td",8)(2,"a",12),a(3),o()(),n(4,"td",13),a(5),m(6,"number"),o(),n(7,"td",15),a(8),m(9,"number"),o()()),t&2){let e=r.$implicit,i=r.$index,p=u(2);d("ngClass",c(12,L,(p.productData==null||p.productData.TopBrand==null?null:p.productData.TopBrand.length)==i+1)),l(2),d("routerLink",v(14,A))("queryParams",c(15,Y,e.ID)),l(),C(" ",e==null?null:e.Name," "),l(2),g(s(6,6,e==null?null:e.Quantity,"1.0-0")),l(3),g(s(9,9,e==null?null:e.Total,"1.0-0"))}}function J(t,r){if(t&1&&T(0,H,10,17,"tr",11,P),t&2){let e=u();b(e.productData==null?null:e.productData.TopBrand)}}function K(t,r){t&1&&D(0)}function U(t,r){if(t&1&&_(0,K,1,0,"ng-container",16),t&2){u();let e=h(38);d("ngTemplateOutlet",e)}}function V(t,r){t&1&&(n(0,"tr",17)(1,"td",18),E(2,"empty-state-table"),o()())}var N=class t{productData;dashboardConfig;constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=S({type:t,selectors:[["app-product-widget"]],inputs:{productData:"productData",dashboardConfig:"dashboardConfig"},decls:39,vars:6,consts:[["EMPTY_STATE",""],[1,"row","mt-12"],[1,"col-md-6","col-xs-12","col-sm-12"],[1,"fw-normal","ps-2",2,"padding-bottom","12px"],[1,"card"],[1,"card-body","p-0"],[1,"table-responsive"],[1,"table"],[1,"ps-8"],[1,"text-end",2,"width","100px"],[1,"text-end","pe-8",2,"width","150px"],[3,"ngClass"],["target","_blank",3,"routerLink","queryParams"],[1,"text-end"],["routerLink","/menu/Reports/Sales_Report/Standard/Products_Sold/Invoice_Items","target","_blank",3,"queryParams"],[1,"text-end","pe-8"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","3"]],template:function(e,i){e&1&&(n(0,"div",1)(1,"div",2)(2,"h4",3),a(3,"Top 5 Product Sold"),o(),n(4,"div",4)(5,"div",5)(6,"div",6)(7,"table",7)(8,"thead")(9,"tr")(10,"th",8),a(11,"Product Name"),o(),n(12,"th",9),a(13,"Sold"),o(),n(14,"th",10),a(15,"Total"),o()()(),n(16,"tbody"),f(17,j,2,0)(18,G,1,1,"ng-container"),o()()()()()(),n(19,"div",2)(20,"h4",3),a(21,"Top 5 Brand Sold"),o(),n(22,"div",4)(23,"div",5)(24,"div",6)(25,"table",7)(26,"thead")(27,"tr")(28,"th",8),a(29,"Brand Name"),o(),n(30,"th",9),a(31,"Sold"),o(),n(32,"th",10),a(33,"Total"),o()()(),n(34,"tbody"),f(35,J,2,0)(36,U,1,1,"ng-container"),o()()()()()()(),_(37,V,3,0,"ng-template",null,0,I)),e&2&&(l(16),y("height",(i.productData==null||i.productData.TopProduct==null?null:i.productData.TopProduct.length)==0?"15.6rem":null),l(),x((i.productData==null||i.productData.TopProduct==null?null:i.productData.TopProduct.length)>0?17:18),l(17),y("height",(i.productData==null||i.productData.TopBrand==null?null:i.productData.TopBrand.length)==0?"15.6rem":null),l(),x((i.productData==null||i.productData.TopBrand==null?null:i.productData.TopBrand.length)>0?35:36))},dependencies:[W,B,M,F,k,w,O],styles:["table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{border-top:0px!important;border-left:0px!important;border-right:0px!important}tbody[_ngcontent-%COMP%]   tr.table-border-bottom-0[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border-bottom:0px!important}"]})};export{N as ProductWidgetComponent};
