import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{u as useTooltipState,a as useMergeRefs}from"./Tooltip.component-D23JdNpf.js";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";var popoverStyles="\n    jn-bg-theme-background-lvl-1\n    jn-text-theme-high \n    jn-inline-flex\t\n  jn-items-center\n    jn-p-2\n    jn-rounded\n    jn-drop-shadow-[0_0_4px_rgba(0,0,0,0.15)]\n",popoverTextStyles="\n    jn-mx-4\n    jn-max-w-full\n",popoverIconStyles="\n    jn-shrink-0\n",getIcon=function(a){return"error"===a?"dangerous":a},TooltipContent=React__default.forwardRef(function(a,b){var c=a.className,d=void 0===c?"":c,e=a.children,f=void 0===e?null:e,g=__rest(a,["className","children"]),h=useTooltipState(),i=useMergeRefs([h.refs.setFloating,b]),j=h.variant;return React__default.createElement(React__default.Fragment,null,h.open&&(React__default.createElement("div",__assign({className:"juno-tooltip juno-tooltip-".concat(j," ").concat(popoverStyles," ").concat(d),ref:i,style:__assign({},h.floatingStyles)},h.getFloatingProps(g)),j&&(React__default.createElement(Icon,{icon:getIcon(j),color:"jn-text-theme-".concat(j),className:"juno-tooltip-popover-icon ".concat(popoverIconStyles)})),React__default.createElement("p",{className:"".concat(popoverTextStyles)},f))))});export{TooltipContent as T};