"use strict";(self.webpackChunkForest_Rangers_System=self.webpackChunkForest_Rangers_System||[]).push([[6338],{86338:function(t,e,a){a.r(e),a.d(e,{default:function(){return W}});var r=a(19860),s=a(70178),n=a(9019),i=a(47313),c=a(1738),h=a(68736),o=a(50177),l=a(22227),d=a(12087),u=a(1413),m=a(29439),x=a(45987),Z=a(19118),f=a.n(Z),p=a(58446),g=a(73428),j=a(54641),b=a(57829),k=a(2471),y=a(46417),S=["title","subheader","chartLabels","chartData"];function v(t){var e=t.title,a=t.subheader,r=t.chartLabels,s=t.chartData,n=(0,x.Z)(t,S),c=(0,i.useState)("Year"),h=(0,m.Z)(c,2),o=h[0],l=(h[1],f()((0,k.F)(),{stroke:{show:!0,width:3,colors:["transparent"]},xaxis:{categories:r},tooltip:{y:{formatter:function(t){return"".concat(t)}}}}));return(0,y.jsxs)(g.Z,(0,u.Z)((0,u.Z)({},n),{},{children:[(0,y.jsx)(j.Z,{title:e,subheader:a}),s.map((function(t){return(0,y.jsx)(b.Z,{sx:{mt:3,mx:3},dir:"ltr",children:t.year===o&&(0,y.jsx)(p.Z,{type:"bar",series:t.data,options:l,height:364})},t.year)}))]}))}function W(){var t=(0,c.I0)(),e=(0,c.v9)((function(t){return t.sales})),a=e.salesStats;e.isLoading;(0,i.useEffect)((function(){t((0,h.Gz)())}),[t]);var u=(0,r.Z)(),m=(0,o.Z)().themeStretch;return(0,y.jsx)(l.Z,{title:"Dashboard | Forest Rangers Ticketing",children:(0,y.jsx)(s.Z,{maxWidth:!m&&"xl",children:(0,y.jsxs)(n.ZP,{container:!0,spacing:3,children:[(0,y.jsx)(n.ZP,{item:!0,xs:12,md:6,children:(0,y.jsx)(d.xq,{title:"Number of Ticket Sales This Month",percent:2.6,total:a.sales,chartColor:u.palette.primary.main,chartData:[5,18,12,51,68,11,39,37,27,20]})}),(0,y.jsx)(n.ZP,{item:!0,xs:12,md:6,children:(0,y.jsx)(d.xq,{title:"Ticket Sales in (ZMW)",percent:-.1,total:a.amount,chartColor:u.palette.chart.red[0],chartData:[8,9,31,8,16,37,8,33,46,31]})}),(0,y.jsx)(n.ZP,{item:!0,xs:12,md:12,lg:12,children:(0,y.jsx)(v,{title:"Monthly Ticket Sales",subheader:"An overview of the monthly ticket sales",chartLabels:["Ticket Sales this Month"],chartData:[{year:"Year",data:[{name:"North Wing",data:[a.north]},{name:"East Wing",data:[a.east]},{name:"South Wing",data:[a.south]},{name:"West Wing",data:[a.west]},{name:"VIP",data:[a.vip]}]}]})})]})})})}}}]);