import type { ReactNode, MouseEvent, MouseEventHandler, ReactElement } from 'react'; import type { Tab, NoChildrenProp, FieldValueListItemProps, ForwardProps, MenuItemProps, Action, BaseProps, TestIdProp, InlineEditProps, OmitStrict } from '@pega/cosmos-react-core'; import type { State, UtilitiesGenAICoachProps } from '../GenAICoach/GenAICoach.types'; import type { getCaseViewTestIds } from './CaseView.test-ids'; export type CaseSummaryFieldsProps = { primary?: SummaryField[]; secondary?: SummaryField[]; inSummaryPanel?: boolean; }; export type SummaryField = { name: FieldValueListItemProps['name']; value: FieldValueListItemProps['value']; simpleValue?: string | number | ReactNode; variant?: FieldValueListItemProps['variant']; } & TestIdProp; export type UtilitySummaryItem = { id: string; iconName: string; iconColor?: string; name: string; count?: number; showNotification?: boolean; onClick?: MouseEventHandler; getContent?: () => ReactNode; }; export interface CaseViewGenAICoachProps extends UtilitiesGenAICoachProps { /** Called when the state of the coach in utilities is changed */ onStateChange?: (state: State) => void; } export interface CaseViewProps extends NoChildrenProp, BaseProps, TestIdProp { /** A unique identifier for the case instance. */ caseId: string; /** * Text to quickly identify a case instance. When omitted, CaseView does not render CaseHeader * and is intended for a parent surface that supplies the record header. */ heading?: string | { text: string; inlineEdit: OmitStrict; }; /** Supplemental text to identify a case instance. */ subheading?: string | string[] | { text: string; inlineEdit: OmitStrict; }; /** Text to identify a case type. */ caseType?: string; /** A set of Link props representing the case parents, rendered as Breadcrumbs. */ parentCases?: MenuItemProps[]; /** An icon name to render as a visual in the case view header. */ icon?: string | URL; /** A contextual color for the case type. */ color?: string; /** Indicates if the current user is following the case. This should be updated based on onFollowedChange. */ followed?: boolean; /** Called when user chooses to follow or unfollow the case. Use this to update followed. */ onFollowedChange?: (following: boolean) => void; /** Case level actions available in an action menu. Accepts either an array or an object ({ items, progress }). */ actions?: Action[] | { items: Action[]; progress: boolean; }; /** Visually promoted case level actions available outside the menu. */ promotedActions?: Action[]; /** A callback for when the edit button is clicked */ onEdit?: () => void; /** Field data to render in summary areas. */ summaryFields: CaseSummaryFieldsProps; /** * Determines the layout state of the summary region. * @default true */ summaryExpanded?: boolean; /** Callback to toggle the case summary's layout. */ onToggleSummary?: () => void; /** An object handling the rendering and functionality of the Tabs in CaseSummary. */ tabs: { items: Tab[]; onClick: (id: string, event?: MouseEvent) => void; currentTabId: string; }; /** A region within the center column that is controlled by tabs in CaseSummary. */ tabContent?: { content: ReactNode; id: string; }[]; /** A region to hold a Stages component. */ stages?: ReactNode; /** A region to hold a Tasks component. */ tasks?: ReactNode; /** A region above the center column to display banners. */ banners?: ReactNode; /** A region to the right reserved for persistent utilities. */ persistentUtility?: { content: ReactNode; title: string; showExpand?: boolean; }; /** Provide an instance of IntelligentGuidance to be rendered for a case. */ intelligentGuidance?: ReactNode; /** A region for case widgets. */ utilities?: ReactNode; /** An indicator of case widgets when the utilities are collapsed. */ utilitiesSummaryItems?: UtilitySummaryItem[]; /** * Determines the layout state of the utilities. * @default true */ utilitiesExpanded?: boolean; /** Callback to toggle the utilities. */ onToggleUtilities?: () => void; /** Gen AI Coach Props */ genAICoachProps?: CaseViewGenAICoachProps; /** An instance of the Collaboration component. */ collaboration?: ReactElement; } export interface CaseViewContextValue extends Pick { testIds: Partial>; /** Viewport-scoped `sm` breakpoint. */ aboveViewportSM: boolean; /** Case view container-scoped `sm` breakpoint. */ aboveSM: boolean; aboveMD: boolean; aboveLG: boolean; aboveXL: boolean; isPreview: boolean; /** True when a GenAI coach is configured to render in the utilities panel. */ hasGenAICoach?: boolean; caseLink?: { href: string; } & ForwardProps; } //# sourceMappingURL=CaseView.types.d.ts.map