import type { MouseEvent, Ref, ReactNode } from 'react'; import type { LinkProps, NoChildrenProp, OmitStrict, StatusProps, TestIdProp } from '@pega/cosmos-react-core'; import type { TaskItemProps } from '../Tasks'; export interface AssignmentProps { /** Unique Id of the assignment */ id: string; /** Assignment name shown in Assignment's description */ name: string; /** Process Name for the assignment. */ processName?: string; /** Service Level Agreement for the assignment. */ sla?: string; /** Number to defined the Urgency of assignment */ urgency: number; /** Assignee's Id, passed on callback of onAssigneeClick */ assigneeId: string; /** Assignee's Name of the assignment */ assigneeName: string; /** Callback fired when click of Assignee Name to show Glimpse component */ onAssigneeClick: (assigneeId: AssignmentProps['assigneeId'], e: MouseEvent) => void; /** Callback fired from the Go button */ onOpen?: (id: AssignmentProps['id'], e: MouseEvent) => void; /** Case identifier */ caseId?: string; /** Meta details for the assignment */ meta?: ReactNode[]; /** Label for the open button of the assignment */ openLabel?: string; } export interface ItemsProps extends NoChildrenProp { /** An array of assignment details to be rendered as Assignment details */ assignments?: AssignmentProps[]; /** An array of child cases to be rendered as case details */ childCases?: CaseListProps[]; /** Callback on toggle of ExpandCollapseButton of each Case, with arguments current expanded state of toggler and case id */ onToggleCollapsed?: (value: boolean, id: string) => void; } export interface CaseListProps extends NoChildrenProp, ItemsProps { /** Name of the task group displayed in the list. */ name: string; /** Unique Id of the childcase */ id: string; /** status details for the case */ status: { text: string; variant: StatusProps['variant']; }; /** Meta details of link to navigate to the case */ link: { onPreview: LinkProps['onPreview']; href: LinkProps['href']; target?: LinkProps['target']; onClick?: (e: MouseEvent, id: CaseListProps['id']) => void; }; } export interface HierarchicalAssignmentProps extends OmitStrict, TestIdProp { /** * Hierarchical Assignment widget's title * @default 'Assignment' */ name?: string; /** Boolean refers to state of the progress in assignment widget */ progress?: boolean; /** Task Content to be rendered on click of Go Action button */ openItem?: TaskItemProps; /** * Boolean that refers the state of the ExpandButton. * @default false */ collapsed?: boolean; /** Callback on toggle of Top level ExpandCollapseButton */ onToggleCollapsed: (collapsed: boolean) => void; /** Ref placed on the element. */ ref?: Ref; /** Boolean that refers the state of the Case expand */ expandAllCases?: boolean; } //# sourceMappingURL=HierarchicalAssignments.types.d.ts.map