import { type ReactNode } from 'react'; import type { EventNotificationRequest, ResourceNotificationRequest } from '@dynatrace-sdk/client-notification-v2'; import type { AriaLabelingProps } from '../../core/types/a11y-props.js'; import type { BehaviorTrackingProps } from '../../core/types/behavior-tracking-props.js'; import type { DataTestId } from '../../core/types/data-props.js'; import type { DOMProps } from '../../core/types/dom.js'; import type { MaskingProps } from '../../core/types/masking-props.js'; import type { StylingProps } from '../../core/types/styling-props.js'; /** @public */ export interface NotificationSettingsResourceNotification { /** * Defines the type of the notifcation that should be subscribed to. */ type: 'resource'; /** * Configuration for a resource notification. Uses the `@dynatrace-sdk/client-notification-v2`. */ config: ResourceNotificationRequest; } /** @public */ export interface NotificationSettingsEventNotification { /** * Defines the type of the notifcation that should be subscribed to. */ type: 'event'; /** * Configuration for a event notification. Uses the `@dynatrace-sdk/client-notification-v2`. */ config: EventNotificationRequest; } /** @public */ export type NotificationSettingsConfig = NotificationSettingsEventNotification | NotificationSettingsResourceNotification; /** * @public */ export type NotificationSettingsProps = StylingProps & DataTestId & MaskingProps & DOMProps & AriaLabelingProps & BehaviorTrackingProps & NotificationSettingsConfig & { /** * Either a ReactNode or a render function that gets passed certain values * from the currently configured notification */ children?: (({ disabled, headingText, infoText, hasReadPermission, hasWritePermission, }: { disabled: boolean; headingText: string; infoText: string; hasReadPermission: boolean; hasWritePermission: boolean; }) => ReactNode) | ReactNode; };