import React from 'react'; import type { OnOpenChangeArgs } from '@atlaskit/dropdown-menu/types'; import type { ToolbarKeyboardNavigationProviderConfig } from '../types'; type AnalyticsEventPayload = { action: string; actionSubject?: string; actionSubjectId?: string; eventType: string; }; type FireAnalyticsEvent = (payload: AnalyticsEventPayload) => void | undefined; export type ToolbarUIContextType = { /** * True only when the toolbar is disabled from isDisabled. * Excludes disabling that comes from interaction state, where buttons are * disabled by default until the user interacts with the editor. */ disabledWithoutInteractionLogic?: boolean; fireAnalyticsEvent?: FireAnalyticsEvent; /** * Indicates whether the toolbar is disabled when the editor is offline. */ isDisabled?: boolean; /** * Configuration for Keyboard Shortcuts/ Navigation */ keyboardNavigation?: ToolbarKeyboardNavigationProviderConfig; /** * Callback for when the dropdown is open/closed. Receives an object with `isOpen` state. * * If the dropdown was closed programmatically, the `event` parameter will be `null`. */ onDropdownOpenChanged: (args: OnOpenChangeArgs) => void; popupsBoundariesElement?: HTMLElement; popupsMountPoint?: HTMLElement; popupsScrollableElement?: HTMLElement; /** * Whether to prevent default behavior on mouse down events on ToolbarButton. */ preventDefaultOnMouseDown?: boolean; }; /** * Access consumer specific config and state within a toolbar component */ export declare const useToolbarUI: () => ToolbarUIContextType; type ToolbarUIProviderProps = { children: React.ReactNode; } & ToolbarUIContextType; export declare const ToolbarUIProvider: ({ children, onDropdownOpenChanged, preventDefaultOnMouseDown, isDisabled, disabledWithoutInteractionLogic, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, fireAnalyticsEvent, keyboardNavigation, }: ToolbarUIProviderProps) => React.JSX.Element; export {};