(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8690,7370,1686,9240],{44267:function(e,t,a){"use strict";a.d(t,{Z:function(){return b}});var o=a(87462),r=a(63366),n=a(67294),l=a(86010),i=a(58510),s=a(90948),d=a(71657),u=a(1977),c=a(8027);function getCardContentUtilityClass(e){return(0,c.ZP)("MuiCardContent",e)}(0,u.Z)("MuiCardContent",["root"]);var p=a(85893);let h=["className","component"],useUtilityClasses=e=>{let{classes:t}=e;return(0,i.Z)({root:["root"]},getCardContentUtilityClass,t)},f=(0,s.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),m=n.forwardRef(function(e,t){let a=(0,d.Z)({props:e,name:"MuiCardContent"}),{className:n,component:i="div"}=a,s=(0,r.Z)(a,h),u=(0,o.Z)({},a,{component:i}),c=useUtilityClasses(u);return(0,p.jsx)(f,(0,o.Z)({as:i,className:(0,l.Z)(c.root,n),ownerState:u,ref:t},s))});var b=m},78445:function(e,t,a){"use strict";a.d(t,{Z:function(){return x}});var o=a(63366),r=a(87462),n=a(67294),l=a(86010),i=a(58510),s=a(15861),d=a(71657),u=a(90948),c=a(1977),p=a(8027);function getCardHeaderUtilityClass(e){return(0,p.ZP)("MuiCardHeader",e)}let h=(0,c.Z)("MuiCardHeader",["root","avatar","action","content","title","subheader"]);var f=a(85893);let m=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],useUtilityClasses=e=>{let{classes:t}=e;return(0,i.Z)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},getCardHeaderUtilityClass,t)},b=(0,u.ZP)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,r.Z)({[`& .${h.title}`]:t.title,[`& .${h.subheader}`]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),y=(0,u.ZP)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),g=(0,u.ZP)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),_=(0,u.ZP)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),v=n.forwardRef(function(e,t){let a=(0,d.Z)({props:e,name:"MuiCardHeader"}),{action:n,avatar:i,className:u,component:c="div",disableTypography:p=!1,subheader:h,subheaderTypographyProps:v,title:x,titleTypographyProps:C}=a,Z=(0,o.Z)(a,m),w=(0,r.Z)({},a,{component:c,disableTypography:p}),j=useUtilityClasses(w),S=x;null==S||S.type===s.Z||p||(S=(0,f.jsx)(s.Z,(0,r.Z)({variant:i?"body2":"h5",className:j.title,component:"span",display:"block"},C,{children:S})));let R=h;return null==R||R.type===s.Z||p||(R=(0,f.jsx)(s.Z,(0,r.Z)({variant:i?"body2":"body1",className:j.subheader,color:"text.secondary",component:"span",display:"block"},v,{children:R}))),(0,f.jsxs)(b,(0,r.Z)({className:(0,l.Z)(j.root,u),as:c,ref:t,ownerState:w},Z,{children:[i&&(0,f.jsx)(y,{className:j.avatar,ownerState:w,children:i}),(0,f.jsxs)(_,{className:j.content,ownerState:w,children:[S,R]}),n&&(0,f.jsx)(g,{className:j.action,ownerState:w,children:n})]}))});var x=v},7276:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboards/manufacturer/SalesChart",function(){return a(20089)}])},1342:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var a in t)Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}(t,{noSSR:function(){return noSSR},default:function(){return dynamic}});let o=a(38754),r=(a(67294),o._(a(24304)));function convertModule(e){return{default:(null==e?void 0:e.default)||e}}function noSSR(e,t){return delete t.webpack,delete t.modules,e(t)}function dynamic(e,t){let a=r.default,o={loading:e=>{let{error:t,isLoading:a,pastDelay:o}=e;return null}};e instanceof Promise?o.loader=()=>e:"function"==typeof e?o.loader=e:"object"==typeof e&&(o={...o,...e}),o={...o,...t};let n=o.loader;return(o.loadableGenerated&&(o={...o,...o.loadableGenerated},delete o.loadableGenerated),"boolean"!=typeof o.ssr||o.ssr)?a({...o,loader:()=>null!=n?n().then(convertModule):Promise.resolve(convertModule(()=>null))}):(delete o.webpack,delete o.modules,noSSR(a,o))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},30043:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let o=a(38754),r=o._(a(67294)),n=r.default.createContext(null)},24304:function(e,t,a){"use strict";/**
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
 MIT License
 Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
 The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
*/Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let o=a(38754),r=o._(a(67294)),n=a(30043),l=[],i=[],s=!1;function load(e){let t=e(),a={loading:!0,loaded:null,error:null};return a.promise=t.then(e=>(a.loading=!1,a.loaded=e,e)).catch(e=>{throw a.loading=!1,a.error=e,e}),a}let LoadableSubscription=class LoadableSubscription{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}};function Loadable(e){return function(e,t){let a=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),o=null;function init(){if(!o){let t=new LoadableSubscription(e,a);o={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return o.promise()}if(!s){let e=a.webpack?a.webpack():a.modules;e&&i.push(t=>{for(let a of e)if(t.includes(a))return init()})}function LoadableComponent(e,t){!function(){init();let e=r.default.useContext(n.LoadableContext);e&&Array.isArray(a.modules)&&a.modules.forEach(t=>{e(t)})}();let l=r.default.useSyncExternalStore(o.subscribe,o.getCurrentValue,o.getCurrentValue);return r.default.useImperativeHandle(t,()=>({retry:o.retry}),[]),r.default.useMemo(()=>{var t;return l.loading||l.error?r.default.createElement(a.loading,{isLoading:l.loading,pastDelay:l.pastDelay,timedOut:l.timedOut,error:l.error,retry:o.retry}):l.loaded?r.default.createElement((t=l.loaded)&&t.default?t.default:t,e):null},[e,l])}return LoadableComponent.preload=()=>init(),LoadableComponent.displayName="LoadableComponent",r.default.forwardRef(LoadableComponent)}(load,e)}function flushInitializers(e,t){let a=[];for(;e.length;){let o=e.pop();a.push(o(t))}return Promise.all(a).then(()=>{if(e.length)return flushInitializers(e,t)})}Loadable.preloadAll=()=>new Promise((e,t)=>{flushInitializers(l).then(e,t)}),Loadable.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let res=()=>(s=!0,t());flushInitializers(i,e).then(res,res)})),window.__NEXT_PRELOADREADY=Loadable.preloadReady;let d=Loadable},94744:function(e,t,a){"use strict";var o=a(5152),r=a.n(o);let n=r()(()=>Promise.all([a.e(4814),a.e(7229)]).then(a.bind(a,47229)),{loadableGenerated:{webpack:()=>[47229]},ssr:!1});t.Z=n},20089:function(e,t,a){"use strict";a.r(t);var o=a(85893),r=a(99226),n=a(66242),l=a(2734),i=a(15861),s=a(44267),d=a(94744),u=a(98456),c=a(78445);t.default=e=>{let{getData:t,loading:a}=e,p=(0,l.Z)();console.log(t,"fdfd");let h=t&&0===t.length,f=0,m=[],b=[],y=[p.palette.primary.main,p.palette.success.main,p.palette.warning.main,p.palette.error.main,p.palette.info.main,p.palette.secondary.main];t&&!h&&t.forEach(e=>{f+=e.totalRevenue||0,m.push(e.totalRevenue||0),b.push(e.storeDisplayName)});let g=m.length>0?m:[0],_={chart:{type:"donut",height:"100%"},colors:y.slice(0,m.length),stroke:{width:0},legend:{show:!1},tooltip:{enabled:!0,custom:e=>{let{seriesIndex:t,series:a}=e,o=b[t]||"Unknown Store",r=a[t];return'<div style="padding: 10px; font-size: 14px; color: '.concat(p.palette.text.primary,';">\n                  <strong>').concat(o,"</strong><br />\n                  Revenue:  <strong> ₹ ").concat(r.toLocaleString("en-IN"),"</strong>\n                </div>")}},dataLabels:{enabled:!1,formatter:e=>"".concat(e.toFixed(0),"%"),style:{fontSize:"11px",fontWeight:"bold"}},plotOptions:{pie:{donut:{size:"70%",labels:{show:!0,name:{show:!0,fontSize:"16px",fontWeight:"bold",color:p.palette.text.secondary,offsetY:-10,formatter:()=>"Total Revenue"},value:{show:!0,fontSize:"20px",fontWeight:"bold",color:p.palette.text.primary,formatter:()=>"₹ ".concat(f.toLocaleString("en-IN"))},total:{show:!0,fontSize:"16px",fontWeight:"bold",color:p.palette.text.primary,formatter:()=>"₹ ".concat(f.toLocaleString("en-IN"))}}}}},responsive:[{breakpoint:1024,options:{chart:{height:330}}},{breakpoint:768,options:{chart:{height:280},plotOptions:{pie:{donut:{size:"65%"}}}}},{breakpoint:480,options:{chart:{height:240},plotOptions:{pie:{donut:{size:"60%"}}}}}]};return(0,o.jsx)(n.Z,{sx:{width:"100%",height:"400px",margin:"auto",borderRadius:2},children:(0,o.jsxs)(s.Z,{children:[(0,o.jsx)(c.Z,{title:"Store Revenue",sx:{p:0}}),a?(0,o.jsx)(r.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:300},children:(0,o.jsx)(u.Z,{})}):h?(0,o.jsx)(r.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:300},children:(0,o.jsx)(i.Z,{variant:"h6",sx:{color:p.palette.text.secondary},children:"No Data Available"})}):(0,o.jsx)(r.Z,{sx:{flex:1,height:300,maxWidth:"100%"},children:(0,o.jsx)(d.Z,{type:"donut",series:g,options:_,height:"100%"})})]})})}},5152:function(e,t,a){e.exports=a(1342)}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=7276)}),_N_E=e.O()}]);