import { type ReactEventHandler, type JSX } from 'react'; import type { AriaLabelingProps, DataTestId, MaskingProps, StylingProps, WithChildren } from '@dynatrace/strato-components/core'; import type { IntentPayload, SendIntentOptions, SendIntentWithResponseOptions } from '@dynatrace-sdk/navigation'; /** * @public */ export interface SuccessRes { status: 'success'; data: Record; } /** * @public */ export interface ErrorRes { status: 'error'; error: Error; } /** * @public */ export interface IntentWithResponseProps extends IntentBaseProps { options: SendIntentWithResponseOptions; onResponse: (response: SuccessRes | ErrorRes) => void; } /** * @public */ export interface IntentWithoutResponseProps extends IntentBaseProps { options: SendIntentOptions; onResponse?: never; } /** * @public */ export type IntentProps = IntentWithResponseProps | IntentWithoutResponseProps; /** * @public */ export interface IntentBaseProps extends WithChildren, AriaLabelingProps, StylingProps, DataTestId, MaskingProps { payload: IntentPayload; onSelect?: ReactEventHandler; onResponse?: never | ((response: SuccessRes | ErrorRes) => void); icon?: JSX.Element; } /** * Intent slot component. * @public */ export declare const Intent: { (props: IntentProps): null; displayName: string; };