import e from"react";import{twMerge as t}from"tailwind-merge";import{BaseColors as l}from"../../../lib/constants.js";import{border as a,borderRadius as r,boxShadow as m}from"../../../lib/shape.js";import{sizing as o}from"../../../lib/sizing.js";import{spacing as s}from"../../../lib/spacing.js";import{fontWeight as i,fontSize as n}from"../../../lib/font.js";import{colorPalette as c,DEFAULT_COLOR as d}from"../../../lib/theme.js";import{getColorClassNames as p}from"../../../lib/utils.js";const g=({children:l})=>e.createElement("div",{className:t(p("white").bgColor,n.sm,r.md.all,a.sm.all,m.lg)},l),u=({value:l,name:s,color:n})=>e.createElement("div",{className:"flex items-center justify-between space-x-8"},e.createElement("div",{className:"flex items-center space-x-2"},e.createElement("span",{className:t("shrink-0",p(n,c.background).bgColor,p("white").borderColor,o.sm.height,o.sm.width,r.full.all,a.md.all,m.md)}),e.createElement("p",{className:t("font-medium tabular-nums text-right whitespace-nowrap",p(d,c.darkText).textColor)},l)),e.createElement("p",{className:t("text-right whitespace-nowrap",p(d,c.text).textColor,i.sm)},s)),b=({active:r,payload:m,label:o,categoryColors:n,valueFormatter:b})=>r&&m?e.createElement(g,null,e.createElement("div",{className:t(p(d,c.lightBorder).borderColor,s.twoXl.paddingX,s.sm.paddingY,a.sm.bottom)},e.createElement("p",{className:t("text-elem",p(d,c.darkText).textColor,i.md)},o)),e.createElement("div",{className:t(s.twoXl.paddingX,s.sm.paddingY,"space-y-1")},m.map((({value:t,name:a},r)=>{var m;return e.createElement(u,{key:`id-${r}`,value:b(t),name:a,color:null!==(m=n.get(a))&&void 0!==m?m:l.Blue})})))):null;export{g as ChartTooltipFrame,u as ChartTooltipRow,b as default};
