/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { ShapeOptions, ConnectionOptions } from '../interfaces/index.js'; import * as React from 'react'; /** * @hidden */ interface TooltipState { visible: boolean; content: React.ReactNode; style: React.CSSProperties; className?: string; } /** * @hidden */ interface DiagramTooltipOptions { shapeTooltipRender: ((dataItem: Record) => React.ReactNode) | null; connectionTooltipRender: ((dataItem: Record) => React.ReactNode) | null; diagramRef: React.RefObject; wrapperRef: React.RefObject; onTooltipShow?: (item: ShapeOptions | ConnectionOptions) => void; onTooltipHide?: (item: ShapeOptions | ConnectionOptions) => void; } /** * @hidden * * Custom hook that manages tooltip state and event handling for the Diagram component. */ export declare const useDiagramTooltip: (options: DiagramTooltipOptions) => { tooltipState: TooltipState; tooltipElRef: React.RefObject; hideTooltip: () => void; handleTooltipShow: (event: { item: { id: string | number; name: string; dataItem: Record; }; point: { x: number; y: number; }; }, diagramOptions: { shapeDefaults?: { tooltip?: { visible?: boolean; cssClass?: string; }; }; connectionDefaults?: { tooltip?: { visible?: boolean; cssClass?: string; }; }; shapes?: ShapeOptions[]; connections?: ConnectionOptions[]; }) => void; handleTooltipHide: (_dataItem: Record) => void; }; export {};