import{j as t,a as j,r as b,h as i,bx as d,F as p,e as x}from"./main-634.js";import{a4 as m}from"./bf-400-72.js";import{e as h}from"./bf-25-81.js";import"./bf-438-114.js";function u({size:s=20,stroke:l=2,className:e}){return t.jsx("svg",{width:s,height:s,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:l,d:"M4 19h16M4 15l4-6l4 2l4-5l4 4"})})}function v({size:s=20,stroke:l=2}){return t.jsx("svg",{width:s,height:s,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(()=>p(()=>import("./bf-669-456.js"),["./bf-669-456.js","./main-634.js","./main-634.css"],import.meta.url),{fallback:t.jsx(x,{className:"g-c",style:{height:300,width:500}})}),B=d(()=>p(()=>import("./bf-625-457.js"),["./bf-625-457.js","./main-634.js","./main-634.css","./bf-170-113.js","./bf-25-81.js","./bf-831-476.css","./bf-247-269.js","./bf-400-72.js","./bf-438-114.js","./bf-542-475.css"],import.meta.url),{fallback:t.jsx(x,{className:"g-c",style:{height:300,width:500}})}),_=d(()=>p(()=>import("./bf-944-458.js"),["./bf-944-458.js","./main-634.js","./main-634.css","./bf-170-113.js","./bf-25-81.js","./bf-831-476.css","./bf-247-269.js","./bf-400-72.js","./bf-438-114.js","./bf-542-475.css"],import.meta.url),{fallback:t.jsx(x,{className:"g-c",style:{height:300,width:500}})}),g=d(()=>p(()=>import("./bf-787-459.js"),["./bf-787-459.js","./main-634.js","./main-634.css","./bf-170-113.js","./bf-25-81.js","./bf-831-476.css","./bf-247-269.js","./bf-400-72.js","./bf-438-114.js","./bf-542-475.css"],import.meta.url),{fallback:t.jsx(x,{className:"g-c",style:{height:300,width:500}})});function k({title:s,data:l}){const{css:e}=j(),[r,n]=b.useState("hBar"),c=l.title||s,o=l.dataList||[];return t.jsxs("div",{className:e(a.mainWrap),children:[t.jsxs("div",{className:e(a.headerWrap),children:[t.jsx("h4",{children:c}),t.jsxs("div",{className:e(a.viewTypeWrp),children:[t.jsx(h,{msg:"Pie Chart",children:t.jsx("button",{type:"button","aria-label":"chart-button",className:`${e(i.icnBtn,i.icn_hover,a.icnBtn)} ${r==="pie"&&"active"}`,onClick:()=>n("pie"),children:t.jsx(v,{})})}),t.jsx(h,{msg:"Vertical Bar Chart",children:t.jsx("button",{type:"button","aria-label":"vertical-bar-button",className:`${e(i.icnBtn,i.icn_hover,a.icnBtn)} ${r==="hBar"&&"active"}`,onClick:()=>n("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(i.icnBtn,i.icn_hover,a.icnBtn)} ${r==="vBar"&&"active"}`,onClick:()=>n("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(i.icnBtn,i.icn_hover,a.icnBtn)} ${r==="line"&&"active"}`,onClick:()=>n("line"),children:t.jsx(u,{})})})]})]}),t.jsxs("div",{className:e(a.reportBody),children:[t.jsxs("div",{className:e(a.chartBody),children:[r==="pie"&&t.jsx(B,{dataList:o,title:c}),r==="line"&&t.jsx(g,{dataList:o,title:c}),(r==="vBar"||r==="hBar")&&t.jsx(_,{viewType:r,dataList:o,title:c})]}),t.jsx("div",{className:e(a.tableBody),children:t.jsx(w,{dataList:o})})]})]})}const a={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{k as default};
