import { type ReactEventHandler, type ReactNode } from 'react'; import { type IntentPayload, type SendIntentOptions, type SendIntentWithResponseOptions } from '@dynatrace-sdk/navigation'; import { UseIntentWithResponseReturn } from '../../core/hooks/intent.js'; import { AriaLabelingProps } from '../../core/types/a11y-props.js'; import { DataTestId } from '../../core/types/data-props.js'; import { MaskingProps } from '../../core/types/masking-props.js'; import { StylingProps } from '../../core/types/styling-props.js'; import { WithChildren } from '../../core/types/with-children.js'; /** * @public */ export interface MenuIntentBaseProps extends WithChildren, AriaLabelingProps, StylingProps, DataTestId, MaskingProps { disabled?: boolean; payload: IntentPayload; onSelect?: ReactEventHandler; } /** * @public */ export interface SuccessResponse { status: 'success'; data: Record; } /** * @public */ export interface ErrorResponse { status: 'error'; error: Error; } /** * @public */ export interface MenuIntentWithResponseProps extends MenuIntentBaseProps { options: SendIntentWithResponseOptions; onResponse: (response: SuccessResponse | ErrorResponse) => void; } /** * @public */ export interface MenuIntentWithoutResponseProps extends MenuIntentBaseProps { options: SendIntentOptions; onResponse?: never; } export type Slots = { icon: ReactNode | null; freeform: ReactNode[]; }; /** * @internal */ export declare function getIntentIcon(icon: ReactNode | undefined, intentIcon: string | null): string | number | true | Iterable | import("react/jsx-runtime").JSX.Element | null | undefined; /** * @internal */ export declare const getHandleSelect: (intent: UseIntentWithResponseReturn, onSelect: ReactEventHandler | undefined, onResponse: (response: SuccessResponse | ErrorResponse) => void) => ReactEventHandler; /** * @public */ export type MenuIntentProps = MenuIntentWithResponseProps | MenuIntentWithoutResponseProps; /** * A menu subcomponent to send intents. * @public */ export declare const Intent: (props: MenuIntentProps & import("react").RefAttributes) => import("react").ReactElement | null;