(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2176],{79770:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/plans/CardOrder",function(){return r(52667)}])},1342:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{noSSR:function(){return noSSR},default:function(){return dynamic}});let a=r(38754),l=(r(67294),a._(r(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 r=l.default,a={loading:e=>{let{error:t,isLoading:r,pastDelay:a}=e;return null}};e instanceof Promise?a.loader=()=>e:"function"==typeof e?a.loader=e:"object"==typeof e&&(a={...a,...e}),a={...a,...t};let o=a.loader;return(a.loadableGenerated&&(a={...a,...a.loadableGenerated},delete a.loadableGenerated),"boolean"!=typeof a.ssr||a.ssr)?r({...a,loader:()=>null!=o?o().then(convertModule):Promise.resolve(convertModule(()=>null))}):(delete a.webpack,delete a.modules,noSSR(r,a))}("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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return o}});let a=r(38754),l=a._(r(67294)),o=l.default.createContext(null)},24304:function(e,t,r){"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 a=r(38754),l=a._(r(67294)),o=r(30043),n=[],i=[],s=!1;function load(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}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 r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;function init(){if(!a){let t=new LoadableSubscription(e,r);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!s){let e=r.webpack?r.webpack():r.modules;e&&i.push(t=>{for(let r of e)if(t.includes(r))return init()})}function LoadableComponent(e,t){!function(){init();let e=l.default.useContext(o.LoadableContext);e&&Array.isArray(r.modules)&&r.modules.forEach(t=>{e(t)})}();let n=l.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return l.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),l.default.useMemo(()=>{var t;return n.loading||n.error?l.default.createElement(r.loading,{isLoading:n.loading,pastDelay:n.pastDelay,timedOut:n.timedOut,error:n.error,retry:a.retry}):n.loaded?l.default.createElement((t=n.loaded)&&t.default?t.default:t,e):null},[e,n])}return LoadableComponent.preload=()=>init(),LoadableComponent.displayName="LoadableComponent",l.default.forwardRef(LoadableComponent)}(load,e)}function flushInitializers(e,t){let r=[];for(;e.length;){let a=e.pop();r.push(a(t))}return Promise.all(r).then(()=>{if(e.length)return flushInitializers(e,t)})}Loadable.preloadAll=()=>new Promise((e,t)=>{flushInitializers(n).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},52667:function(e,t,r){"use strict";r.r(t);var a=r(85893),l=r(67294),o=r(99226),n=r(66242),i=r(15861),s=r(5152),d=r.n(s);let u=d()(()=>Promise.all([r.e(4814),r.e(7229)]).then(r.bind(r,47229)),{loadableGenerated:{webpack:()=>[47229]},ssr:!1});t.default=()=>{let[e,t]=(0,l.useState)({Total:230,Booked:180,Paid:140,Failed:50}),r={Total:200,Booked:160,Paid:130,Failed:60},calculatePercentageChange=(e,t)=>(e-t)/t*100,s={chart:{id:"order-graph",type:"line",height:"100%",toolbar:{show:!1},offsetY:-10},xaxis:{categories:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],axisBorder:{show:!1},axisTicks:{show:!0,color:"#333"},labels:{show:!1}},yaxis:{show:!1},grid:{show:!1},stroke:{curve:"smooth",width:2},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.7,opacityTo:.25,stops:[0,100,100,100]}},colors:["#00c292","#FF5733","#FFC107","#FF6F61"]},d=[{name:"Total Orders",data:[230,210,250,300,280,320,310]},{name:"Booked Orders",data:[180,200,190,220,240,260,250]},{name:"Paid Orders",data:[140,130,150,160,170,190,180]},{name:"Failed Orders",data:[50,60,45,70,65,55,40]}];return(0,a.jsx)(n.Z,{sx:{padding:0,borderRadius:"8px",boxShadow:"none !important",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"0 -8px",background:"#00000000"},children:(0,a.jsx)(o.Z,{sx:{display:"flex",justifyContent:"space-between",width:"100%"},children:["Total Orders","Booked Orders","Paid Orders","Failed Orders"].map((t,l)=>{let c=e[t.replace(" Orders","")],f=r[t.replace(" Orders","")],p=calculatePercentageChange(c,f).toFixed(2);return(0,a.jsxs)(n.Z,{sx:{padding:"1rem",textAlign:"center",borderRadius:"8px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",display:"flex",flexDirection:"column",justifyContent:"space-between",position:"relative",flex:1,margin:1,backgroundColor:"white"},children:[(0,a.jsxs)(o.Z,{sx:{paddingBottom:.5},children:[(0,a.jsx)(i.Z,{variant:"body2",fontWeight:"500",textTransform:"capitalize",gutterBottom:!0,children:t}),(0,a.jsx)(i.Z,{variant:"h6",sx:{fontWeight:"bold",paddingTop:.5},children:c})]}),(0,a.jsxs)(o.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:1},children:[(0,a.jsx)(o.Z,{sx:{marginLeft:0,minWidth:"50px"},children:(0,a.jsxs)(i.Z,{variant:"body2",color:"text.secondary",children:["Last Week: ",p>=0?"+":"",p,"%"]})}),(0,a.jsx)(o.Z,{sx:{flex:1,height:90},children:(0,a.jsx)(u,{options:{...s,colors:[s.colors[l]]},series:[d[l]],type:"line",height:90})})]})]},l)})})})}},5152:function(e,t,r){e.exports=r(1342)}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=79770)}),_N_E=e.O()}]);