import type { Ref } from 'react'; import type { StatusProps, ForwardRefForwardPropsComponent, FieldValueListProps, NoChildrenProp, RequireAtLeastOne, LinkProps } from '@pega/cosmos-react-core'; import type { CountdownButtonProps } from './CountdownButton'; interface InfoText extends Partial> { /** Visually hidden description for accessibility purposes. */ description: string; /** Information text. */ text: string; } /** A simple callback or an object to customize notification button properties. */ type NotificationAction = (() => void) | { /** Custom label for the button. */ text?: string; /** Handler invoked when the button is clicked. */ handler: () => void; }; export type InteractionNotificationProps = RequireAtLeastOne; /** Name of the icon used in header. */ icon: string; /** Interaction title. */ title: string; /** Represents the current status of interaction. */ status: { variant: StatusProps['variant']; text: string; }; /** Information structured as field values to be displayed below main section. */ fields?: FieldValueListProps['fields']; /** Timeout definition */ incomingNotificationTimeout?: { startTime: CountdownButtonProps['startTime']; answerTimeout: CountdownButtonProps['timeout']; onTimerEnd?: CountdownButtonProps['onTimerEnd']; }; /** Callback when accept button is clicked. */ onAccept?: NotificationAction; /** Callback when dismiss button is clicked. */ onDismiss?: NotificationAction; } & ({ /** Primary information of the notification. For example caller name. */ primaryText: InfoText; /** Secondary information of the notification. For example phone number of the caller. */ secondaryText?: InfoText; /** Tertiary information of the notification. For example role of the caller. */ tertiaryText?: InfoText; } | { /** Primary information of the notification. For example caller name. */ primaryText: string; /** Secondary information of the notification. For example phone number of the caller. */ secondaryText?: string; /** Tertiary information of the notification. For example role of the caller. */ tertiaryText?: string; }), 'onAccept' | 'onDismiss'>; declare const InteractionNotification: ForwardRefForwardPropsComponent; export default InteractionNotification; //# sourceMappingURL=InteractionNotification.d.ts.map