(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9448],{10053:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/productPage/CardProduct",function(){return n(8242)}])},8242:function(t,e,n){"use strict";n.r(e);var o=n(85893),i=n(99226),r=n(66242),a=n(15861),c=n(42412),d=n(87066),l=n(81406),s=n(67294);e.default=t=>{let{GetallData:e}=t,[n,u]=(0,s.useState)();return(0,s.useEffect)(()=>{let fetchData=async()=>{let t=window.localStorage.getItem(c.Z.storageTokenKeyName);try{let e=await d.Z.get("".concat(l.Ao,"/api/products/counts?statusFilter=all"),{headers:{Authorization:"Bearer ".concat(t)}});u(e.data)}catch(t){console.error("Error fetching data:",t)}};fetchData()},[e]),(0,o.jsx)(r.Z,{sx:{padding:0,borderRadius:2,boxShadow:"none !important",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"0 -12px",background:"#00000000"},children:(0,o.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",width:"100%"},children:[(0,o.jsx)(r.Z,{sx:{padding:"1.5rem",textAlign:"center",borderRadius:"12px",flexDirection:"column",justifyContent:"space-between",position:"relative",flex:1,margin:3,backgroundColor:"#003366"},children:(0,o.jsxs)(i.Z,{sx:{paddingBottom:1},children:[(0,o.jsx)(a.Z,{variant:"body2",textTransform:"capitalize",color:"white",gutterBottom:!0,children:"Total Products"}),(0,o.jsx)(a.Z,{variant:"h5",sx:{fontWeight:"bold",paddingTop:1,color:"white"},children:null==n?void 0:n.totalProducts})]})}),(0,o.jsx)(r.Z,{sx:{padding:"1.5rem",textAlign:"center",borderRadius:"12px",display:"flex",flexDirection:"column",justifyContent:"space-between",position:"relative",flex:1,margin:3,backgroundColor:"#2F4F4F"},children:(0,o.jsxs)(i.Z,{sx:{paddingBottom:1},children:[(0,o.jsx)(a.Z,{variant:"body2",textTransform:"capitalize",color:"white",gutterBottom:!0,children:"Active Products"}),(0,o.jsx)(a.Z,{variant:"h5",sx:{fontWeight:"bold",paddingTop:1,color:"white"},children:null==n?void 0:n.activeProducts})]})}),(0,o.jsx)(r.Z,{sx:{padding:"1.5rem",textAlign:"center",borderRadius:"12px",display:"flex",flexDirection:"column",justifyContent:"space-between",position:"relative",flex:1,margin:3,backgroundColor:"#8B0000"},children:(0,o.jsxs)(i.Z,{sx:{paddingBottom:1},children:[(0,o.jsx)(a.Z,{variant:"body2",textTransform:"capitalize",color:"white",gutterBottom:!0,children:"Inactive Products"}),(0,o.jsx)(a.Z,{variant:"h5",sx:{fontWeight:"bold",paddingTop:1,color:"white"},children:null==n?void 0:n.inactiveProducts})]})})]})})}}},function(t){t.O(0,[9774,2888,179],function(){return t(t.s=10053)}),_N_E=t.O()}]);