import { type FC, type ReactNode } from 'react'; import type { Notification } from '../../api/notifications'; import type { ToolDescriptor } from './c3-navigation-v2.types'; import { type InfoPanelElement } from './tools/c3-info-panel'; import { type C3NotificationsPanelLabels } from './tools/c3-notifications-panel'; import { type C3UserPanelProps } from './tools/c3-user-panel'; export interface NotificationsToolOptions { onLinkClick?: (meta: Notification['meta']) => void; ariaLabel?: string; /** Forwarded to `C3NotificationsPanel`. */ title?: string | null; /** Forwarded to `C3NotificationsPanel`. */ labels?: C3NotificationsPanelLabels; } export type UserToolOptions = C3UserPanelProps & { ariaLabel?: string; }; export interface HelpToolOptions { onClick: () => void; ariaLabel?: string; } export interface InfoToolOptions { elements: InfoPanelElement[]; /** Forwarded to `C3InfoPanel`. */ title?: string | null; ariaLabel?: string; } export interface UseCamundaToolsOptions { /** * Notifications tool with a right-side panel. Omit to hide; pass `{}` for * defaults, or an options object to customise behaviour. */ notifications?: NotificationsToolOptions; /** * User/account tool with a right-side panel. Omit to hide; pass `{}` for * defaults, or options with profile/version/stageToggle/customSection. */ user?: UserToolOptions; /** * Info/help panel with a list of link elements (docs, academy, support…). * Consumer provides the elements; C3 renders the panel. */ info?: InfoToolOptions; /** * Help button with no panel. Consumer provides the onClick action. */ help?: HelpToolOptions; } export interface UseCamundaToolsReturn { tools: ToolDescriptor[]; /** * Wraps the consumer's nav subtree with the providers the requested tools * depend on. Currently only notifications needs a provider; when omitted, * `ToolsProvider` passes children through unchanged. Wrap the * `` render with this so the tool components can read their * context inside the JSX they're rendered into. */ ToolsProvider: FC<{ children: ReactNode; }>; } /** * Single helper entry point for the standard Camunda tool set. * Returns a `ToolDescriptor[]` for `C3NavigationV2`'s `tools` prop plus a * `ToolsProvider` that conditionally mounts the providers each requested tool * depends on. Custom tools can be appended to the returned array; if they * have their own provider needs, layer a separate wrapper outside * `ToolsProvider`. * * Must be called within a `C3UserConfigurationProvider` tree (SaaS). */ export declare const useCamundaTools: (options: UseCamundaToolsOptions) => UseCamundaToolsReturn;