import type { ReactNode } from 'react'; import type { AvatarProps, BaseProps, ForwardProps, ListToolbarProps, NoChildrenProp, SearchInputProps, TestIdProp } from '@pega/cosmos-react-core'; import type { ViewSelectorProps } from '@pega/cosmos-react-core/lib/components/ListToolbar/ListToolbar.types'; import type { TaskItemProps } from './TaskList'; export interface TaskGroupProps extends BaseProps { /** Unique key for this group, typically the case type class name. */ id: string; /** Display name for the card header (localized case type label). */ name: string; /** Optional visual element rendered before the heading (e.g. a case-type icon). */ visual?: ReactNode; /** Assignments belonging to this group. */ items: TaskItemProps[]; /** Total count on the server (may exceed items.length before Show More). */ count?: number; /** Marks this group as the Approvals card. Controls visual treatment. */ isApprovals?: boolean; /** Callback when Show More is clicked for this group (e.g. to trigger a fetch). */ onShowMore?: () => void; /** Flag while this group is loading more items. */ loadingMore?: boolean; } interface TasksBaseProps extends NoChildrenProp, TestIdProp { /** Heading text to render at the top of the list. */ name: ListToolbarProps['name']; /** A visual to accompany the header text. */ avatar?: Pick; /** Definition of view selection. */ viewSelector?: Pick; /** Integer representing the total count of tasks. */ count?: number; /** * Whether to display the result count in the header. * @default true */ showCount?: boolean; /** Opt-in search configuration. */ search?: Pick; /** Callback for when to show more/less button is clicked. Lists greater than 3 items will display the show toggle button in its footer if passed. */ onExpandToggle?: () => void; /** * Flag indicating more items are being fetched * @default false */ loadingMore?: boolean; /** * Whether to fit Tasks widget in the parent element. */ fitToParent?: boolean; /** * Callback invoked with the calculated item limit based on available height. * Only fires when fitToParent is true. */ onItemLimitChange?: (limit: number) => void; } type TasksVariantProps = { /** * Rendering variant. * @default 'list' */ variant?: 'list'; /** An array of TaskItemProps to generate the list. */ items?: TaskItemProps[]; /** Not applicable for the list variant. */ groups?: never; } | { /** Rendering variant. */ variant: 'cards'; /** Not applicable for the cards variant. */ items?: never; /** Groups to render as cards. */ groups: TaskGroupProps[]; }; export type TasksProps = TasksBaseProps & TasksVariantProps; export declare const StyledTasks: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute & import("react").RefAttributes & ForwardProps, "ref"> & { ref?: ((instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject | null | undefined; }, { openItem?: boolean; fitToParent?: boolean; }>> & string & Omit, keyof import("react").Component>; declare const _default: ((props: TasksProps & ForwardProps) => import("react/jsx-runtime").JSX.Element) & { getTestIds: (testIdProp?: TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord; }; export default _default; //# sourceMappingURL=Tasks.d.ts.map