const e=require(`./chunk-BcutgqC9.cjs`),t=require(`./utils-8yHOSEWy.cjs`),n=require(`./createLucideIcon-BDgzJx6F.cjs`),r=require(`./Button.cjs`);let i=require(`react`);i=e.n(i,1);let a=require(`react/jsx-runtime`);var o=n.t(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),s=n.t(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),c=i.default.forwardRef(({className:e,children:n,...r},i)=>(0,a.jsx)(`div`,{className:t.t(`@container w-full border border-primary-gray-300 dark:border-primary-gray-600`,e),ref:i,...r,children:n}));c.displayName=`VisualizationWidget`;var l=i.default.createContext({selectedValue:void 0,hoverItemClass:void 0,activeItemClass:void 0,onValueChange:()=>{}}),u=i.default.forwardRef(({className:e,children:n,defaultValue:r,activeItemClass:o,hoverItemClass:s,onChange:c,...u},d)=>{let[f,p]=i.default.useState(r||``),m=i.default.useCallback(e=>{p(e),c?.(e)},[c]),h=i.default.useMemo(()=>({activeItemClass:o,selectedValue:f,hoverItemClass:s,onValueChange:m}),[f,o,s,m]);return(0,a.jsx)(l.Provider,{value:h,children:(0,a.jsx)(`div`,{className:t.t(`flex gap-0 w-full bg-primary-gray-300 dark:bg-primary-gray-600`,e),ref:d,...u,children:n})})});u.displayName=`VisualizationWidgetHeader`;var d=i.default.forwardRef(({className:e,children:n,value:r,...o},s)=>{let{selectedValue:c,activeItemClass:u,hoverItemClass:d,onValueChange:f}=i.default.useContext(l);return(0,a.jsx)(`button`,{ref:s,type:`button`,...o,onClick:()=>f(r),className:t.t(`flex border-0 flex-col grow cursor-pointer gap-1 items-center justify-center p-3 font-medium bg-primary-gray-100 dark:bg-primary-gray-650 text-primary-gray-500 dark:text-primary-white text-sm font-medium border-r border-r-primary-gray-400 dark:border-r-primary-gray-550 last:border-r-0`,c===r?u||`bg-primary-white text-primary-blue-600 dark:bg-primary-gray-700`:``,d?`hover:${d} dark:hover:${d}`:`hover:bg-primary-white dark:hover:bg-primary-gray-700`,e),children:n})});d.displayName=`VisualizationWidgetHeaderItem`;var f=i.default.forwardRef(({className:e,children:n,...r},i)=>(0,a.jsx)(`div`,{className:t.t(`flex gap-0 flex-wrap items-stretch max-h-none flex-col @3xl:max-h-[80vh] @3xl:flex-row`,e),ref:i,...r,children:n}));f.displayName=`VisualizationWidgetBody`;var p=i.default.forwardRef(({className:e,children:n,collapsible:c,...l},u)=>{let[d,f]=i.default.useState(c?.defaultCollapsed||!1);return(0,a.jsxs)(`div`,{className:t.t(`undp-scrollbar max-h-none @3xl:max-h-[80vh] bg-primary-gray-100 dark:bg-primary-gray-650 border-r-0 @3xl:border-r @3xl:border-r-primary-gray-400 dark:@3xl:border-r-primary-gray-600`,d?`w-full @3xl:w-[40px] py-4 px-2`:`w-full @3xl:w-1/3 @7xl:w-1/4 @8xl:w-1/5 p-4`,e),ref:u,...l,children:[(0,a.jsx)(`div`,{className:`w-full hidden @3xl:block relative`,children:c?.enabled===!1?null:(0,a.jsx)(r.Button,{type:`button`,variant:`tertiary`,size:`sm`,onClick:()=>f(!d),className:t.t(`flex rounded-full normal-case text-primary-gray-700 dark:text-primary-gray-700 w-6 h-6 absolute top-0 right-0 p-0`,c?.triggerButtonClassName),style:c?.triggerButtonStyles,children:c?.triggerButtonChildren||(d?(0,a.jsx)(s,{}):(0,a.jsx)(o,{}))})}),c?.enabled!==!1&&d?null:n]})});p.displayName=`VisualizationWidgetBodySidebar`;var m=i.default.forwardRef(({className:e,children:n,...r},i)=>(0,a.jsx)(`div`,{className:t.t(`flex flex-wrap undp-scrollbar flex-1 bg-primary-white dark:bg-primary-gray-700 max-h-none @3xl:max-h-[80vh]`,e),ref:i,...r,children:n}));m.displayName=`VisualizationWidgetBodyContent`,Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
//# sourceMappingURL=visualization-widget-D6ruS178.cjs.map