import{j as t,a as v,r as j,x as s,aG as d,aH as x,f as p}from"./main-40.js";import{T as h}from"./bf-141-80.js";function m({size:a=20,stroke:n=2,className:e}){return t.jsx("svg",{width:a,height:a,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e,children:t.jsx("path",{fill:"currentColor",d:"M4 20V9h4v11H4Zm6 0V4h4v16h-4Zm6 0v-7h4v7h-4Z"})})}function u({size:a=20,stroke:n=2,className:e}){return t.jsx("svg",{width:a,height:a,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e,children:t.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:n,d:"M4 19h16M4 15l4-6l4 2l4-5l4 4"})})}function b({size:a=20,stroke:n=2}){return t.jsx("svg",{width:a,height:a,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fill:"currentColor",d:"M15.985 8.5H8.207l-5.5 5.5a8 8 0 0 0 13.277-5.5zM2 13.292A8 8 0 0 1 7.5.015v7.778l-5.5 5.5zM8.5.015V7.5h7.485A8.001 8.001 0 0 0 8.5.015z"})})}const w=d(()=>x(()=>import("./bf-236-321.js"),["./bf-236-321.js","./main-40.js","./main-40.css"],import.meta.url),{fallback:t.jsx(p,{className:"g-c",style:{height:300,width:500}})}),B=d(()=>x(()=>import("./bf-811-322.js"),["./bf-811-322.js","./main-40.js","./main-40.css","./bf-940-87.js","./bf-497-146.js","./bf-683-113.js","./bf-141-80.js","./bf-149-418.css","./bf-159-119.js","./bf-280-123.js","./bf-642-124.js","./bf-236-125.js","./bf-586-70.js","./bf-249-417.css","./bf-860-126.js","./bf-476-127.js","./bf-528-128.js","./bf-55-130.js","./bf-791-423.css","./bf-689-131.js","./bf-976-132.js","./bf-547-83.js","./bf-739-421.css"],import.meta.url),{fallback:t.jsx(p,{className:"g-c",style:{height:300,width:500}})}),g=d(()=>x(()=>import("./bf-811-323.js"),["./bf-811-323.js","./main-40.js","./main-40.css","./bf-940-87.js","./bf-497-146.js","./bf-683-113.js","./bf-141-80.js","./bf-149-418.css","./bf-159-119.js","./bf-280-123.js","./bf-642-124.js","./bf-236-125.js","./bf-586-70.js","./bf-249-417.css","./bf-860-126.js","./bf-476-127.js","./bf-528-128.js","./bf-55-130.js","./bf-791-423.css","./bf-689-131.js","./bf-976-132.js","./bf-547-83.js","./bf-739-421.css"],import.meta.url),{fallback:t.jsx(p,{className:"g-c",style:{height:300,width:500}})}),_=d(()=>x(()=>import("./bf-916-324.js"),["./bf-916-324.js","./main-40.js","./main-40.css","./bf-940-87.js","./bf-497-146.js","./bf-683-113.js","./bf-141-80.js","./bf-149-418.css","./bf-159-119.js","./bf-280-123.js","./bf-642-124.js","./bf-236-125.js","./bf-586-70.js","./bf-249-417.css","./bf-860-126.js","./bf-476-127.js","./bf-528-128.js","./bf-55-130.js","./bf-791-423.css","./bf-689-131.js","./bf-976-132.js","./bf-547-83.js","./bf-739-421.css"],import.meta.url),{fallback:t.jsx(p,{className:"g-c",style:{height:300,width:500}})});function C({title:a,data:n}){const{css:e}=v(),[i,l]=j.useState("hBar"),c=n.title||a,o=n.dataList||[];return t.jsxs("div",{className:e(r.mainWrap),children:[t.jsxs("div",{className:e(r.headerWrap),children:[t.jsx("h4",{children:c}),t.jsxs("div",{className:e(r.viewTypeWrp),children:[t.jsx(h,{msg:"Pie Chart",children:t.jsx("button",{type:"button","aria-label":"chart-button",className:`${e(s.icnBtn,s.icn_hover,r.icnBtn)} ${i==="pie"&&"active"}`,onClick:()=>l("pie"),children:t.jsx(b,{})})}),t.jsx(h,{msg:"Vertical Bar Chart",children:t.jsx("button",{type:"button","aria-label":"vertical-bar-button",className:`${e(s.icnBtn,s.icn_hover,r.icnBtn)} ${i==="hBar"&&"active"}`,onClick:()=>l("hBar"),children:t.jsx(m,{})})}),t.jsx(h,{msg:"Horizontal Bar Chart",children:t.jsx("button",{type:"button","aria-label":"horizontal-bar-button",className:`${e(s.icnBtn,s.icn_hover,r.icnBtn)} ${i==="vBar"&&"active"}`,onClick:()=>l("vBar"),children:t.jsx(m,{className:e({tm:"rotate(90deg)"})})})}),t.jsx(h,{msg:"Line Chart",children:t.jsx("button",{type:"button","aria-label":"line-chart-button",className:`${e(s.icnBtn,s.icn_hover,r.icnBtn)} ${i==="line"&&"active"}`,onClick:()=>l("line"),children:t.jsx(u,{})})})]})]}),t.jsxs("div",{className:e(r.reportBody),children:[t.jsxs("div",{className:e(r.chartBody),children:[i==="pie"&&t.jsx(B,{dataList:o,title:c}),i==="line"&&t.jsx(_,{dataList:o,title:c}),(i==="vBar"||i==="hBar")&&t.jsx(g,{viewType:i,dataList:o,title:c})]}),t.jsx("div",{className:e(r.tableBody),children:t.jsx(w,{dataList:o})})]})]})}const r={mainWrap:{p:"20px",b:"1px solid #ccc",brs:"8px",mb:"20px",bd:"#fff"},icnBtn:{w:"30px",h:"30px",ow:"hidden",brs:"8px"},headerWrap:{dy:"flex",jc:"space-between"},viewTypeWrp:{dy:"flex",ai:"center",jc:"space-between",w:"130px"},reportBody:{dy:"flex",w:"100%",jc:"space-between",gp:10},chartBody:{w:"60%"},tableBody:{w:"40%"}};export{C as default};
