{"version":3,"file":"index.M-iCQfvH.js","sources":["../../../../../../../node_modules/@babylon/ui-kit-base/components/icons/icon-with-tooltip/index.js"],"sourcesContent":["import { jsxs, Fragment, jsx } from 'react/jsx-runtime';\nimport Icon from '../icon/index.js';\nimport Tooltip from '../../others/tooltip/index.js';\nimport { useRef } from 'react';\nimport { useBoolean } from 'usehooks-ts';\n\nconst defaultTooltipProps = {\n    placement: 'bottom-start',\n    isNegative: false\n};\nconst IconWithTooltip = ({ className, tooltipProps, children })=>{\n    const iconRef = useRef(null);\n    const { value, setFalse, setTrue } = useBoolean();\n    return /*#__PURE__*/ jsxs(Fragment, {\n        children: [\n            /*#__PURE__*/ jsx(Icon, {\n                \"data-testid\": \"IconWithTooltip\",\n                className: className,\n                ref: iconRef,\n                onMouseEnter: setTrue,\n                onMouseLeave: setFalse\n            }),\n            value && !!children && /*#__PURE__*/ jsx(Tooltip, {\n                referenceElement: iconRef.current,\n                ...defaultTooltipProps,\n                ...tooltipProps,\n                children: children\n            })\n        ]\n    });\n};\n\nexport { IconWithTooltip as default };\n//# sourceMappingURL=index.js.map\n"],"names":["defaultTooltipProps","IconWithTooltip","className","tooltipProps","children","iconRef","useRef","value","setFalse","setTrue","useBoolean","jsxs","Fragment","jsx","Icon","Tooltip"],"mappings":"sEAMA,MAAMA,EAAsB,CACxB,UAAW,eACX,WAAY,EAChB,EACMC,EAAkB,CAAC,CAAE,UAAAC,EAAW,aAAAC,EAAc,SAAAC,CAAQ,IAAK,CAC7D,MAAMC,EAAUC,EAAM,OAAC,IAAI,EACrB,CAAE,MAAAC,EAAO,SAAAC,EAAU,QAAAC,CAAO,EAAKC,EAAY,EACjD,OAAqBC,EAAAA,KAAKC,EAAAA,SAAU,CAChC,SAAU,CACQC,EAAAA,IAAIC,EAAM,CACpB,cAAe,kBACf,UAAWZ,EACX,IAAKG,EACL,aAAcI,EACd,aAAcD,CAC9B,CAAa,EACDD,GAAS,CAAC,CAACH,GAA0BS,EAAAA,IAAIE,EAAS,CAC9C,iBAAkBV,EAAQ,QAC1B,GAAGL,EACH,GAAGG,EACH,SAAUC,CACb,CAAA,CACb,CACA,CAAK,CACL","x_google_ignoreList":[0]}